LORVEN PUBLIC SCHOOL
Affiliated to CISCE, New Delhi. Anekal Road, chandapura-560081
January Monthly Test
Class: X-A Subject: Computer Applications Marks: 50
I. Fill in the blanks. 10M
a. The last subscript of a single dimensional array containing N elements is _____________.
b. In java, array elements are counted from __________.
c. If int x [] = {1, 2, 3, 4, 5, 6, 7, 8, 9} then
i. X.length =_________
ii. x[5] + x[1]* (x[8]/x[2]) = _____________
iii. Math.pow(x[4],x[2]) = _______________
iv. Math.sqrt(x[1]*x[7]) = _______________
d. Given array int z [] = {15, 16, 17}; It will occupy __________bytes in memory.
e. In ________ search, the algorithm uses the middle value of the array for the search operation.
f. The size of an array that signifies the number of elements it can store is given using ______
brackets.
g. _____________ is a sorting technique which sorts an array from last to first.
II. Write any 4 of the following programs. 40M
a. Write a program to create 2 integer arrays and read elements into them and swap the elements of
arrays and print the resultant arrays.
b. Write a program to create an integer array and read the elements and display the array. Find out
the biggest and smallest elements of the array and display them as output.
c. Write a program to find the frequency of a number in an integer array and display the frequency
as output.
d. Write a program to create a character array and read elements into it. Count the number of ovals
in the array and display them. Display the total number of ovals in the array as well.
e. Given 2 arrays,
• a [] = {1,2,3,4,5}
• b [] = {6,7,8,9,0}
write a program to merge the given arrays such that the merged array (r) has the elements in
the following order
r [] = {1,6,2,7,3,8,4,9,5,0}