COMPUTER APPLICATIONS
Long Answer Type Questions — Array Programming Assignment
Syllabus Alignment: ICSE Class X (Arrays & Matrices)
SECTION A: SINGLE DIMENSIONAL ARRAYS
Question 1 [ICSE 2022 (Sem II)]
Define a class to declare an array of size twenty of double data type, accept the elements into the array
and perform the following:
• Calculate and print the product of all the elements.
• Print the square of each element of the array.
Question 2 [ICSE SOP 2022 (Sem II)]
Define a class to declare an array of size 20 of double datatype, accept the elements into the array and
perform the following:
• Calculate and print the sum of all the elements.
• Calculate and print the highest value of the array.
Question 3 [ICSE 2023]
Define a class to accept values into an integer array of size 10. Find the sum of single-digit numbers and
the sum of two-digit numbers entered. Display them separately.
EXAMPLE INPUT / OUTPUT
Input: a[] = {2, 12, 4, 9, 18, 25, 3, 32, 20, 1}
Output:
Sum of one digit numbers: 2 + 4 + 9 + 3 + 1 = 19
Sum of two digit numbers: 12 + 18 + 25 + 32 + 20 = 107
Question 4 [ICSE SQP 2023]
Define a class to accept values into a double array of size 20 and print the range of the array. Range is
the difference between the largest and the smallest elements of the array.
ICSE Class X Computer Applications • Question Bank Page 1 of 4
Question 5 [ICSE 2018]
Write a program to accept the name and total marks of N number of students in two single subscript
arrays name[] and totalmarks[].
Calculate and print:
1. The average of the total marks obtained by N number of students.
[average = (sum of total marks of all the students) / N]
2. Deviation of each student's total marks with the average.
[deviation = total marks of a student - average]
Question 6 [ICSE 2015]
Write a program to input and store roll numbers, names and marks in 3 subjects of N number of students
in five single dimensional arrays and display the remark based on average marks as given below:
Average Marks Remark
85 — 100 Excellent
75 — 84 Distinction
60 — 74 First Class
40 — 59 Pass
Less than 40 Poor
Question 7 [ICSE SQP 2017]
Write a program to create an array to store 10 integers and print the largest integer and the smallest
integer in that array.
ICSE Class X Computer Applications • Question Bank Page 2 of 4
SECTION B: DOUBLE DIMENSIONAL ARRAYS (MATRICES)
Question 8 [ICSE SQP 2020]
Write a program to input and store integer elements in a double dimensional array of size 4 × 4 and find
the sum of all the elements.
EXAMPLE MATRIX
7 3 4 5
5 4 6 1
6 9 4 2
3 2 7 5
Output: Sum of all the elements: 73
Question 9 [ICSE SQP 2024]
Define a class to accept values into a 3 × 3 array and check if it is a special array. An array is a special
array if the sum of the even elements equals the sum of the odd elements.
EXAMPLE
A[][] = { {4, 5, 6}, {5, 3, 2}, {4, 2, 5} }
Sum of even elements = 4 + 6 + 2 + 4 + 2 = 18
Sum of odd elements = 5 + 5 + 3 + 5 = 18
Output: It is a special array.
Question 10 [ICSE 2020]
Write a program to input and store integer elements in a double dimensional array of size 3 × 3 and find
the sum of elements in the left diagonal.
EXAMPLE GRID
1 3 5
4 6 8
9 2 4
Output: Sum of the left diagonal elements = (1 + 6 + 4) = 11
ICSE Class X Computer Applications • Question Bank Page 3 of 4
Question 11 [ICSE 2024]
Define a class to accept values into an integer array of order 4 × 4 and check whether it is a DIAGONAL
array or not. An array is DIAGONAL if the sum of the left diagonal elements equals the sum of the right
diagonal elements. Print the appropriate message.
EXAMPLE
3 4 2 5
2 5 2 3
5 3 2 7
1 3 7 1
Sum of the left diagonal elements = 3 + 5 + 2 + 1 = 11
Sum of the right diagonal elements = 5 + 2 + 3 + 1 = 11
Question 12 [ICSE 2025]
Define a class to accept values into a 4 × 4 integer array. Calculate and print the NORM of the array.
NORM is the square root of sum of squares of all elements.
EXAMPLE MATRIX
1 2 1 3
5 2 1 6
3 6 1 2
3 4 6 3
Sum of squares of elements = 1 + 4 + 1 + 9 + 25 + 4 + 1 + 36 + 9 + 36 + 1 + 4 + 9 + 16 + 36 + 9 = 201
NORM = Squareroot of 201 = 14.17744687875825
ICSE Class X Computer Applications • Question Bank Page 4 of 4