You are on page 1of 2

Ajay Chaudhary Classes

Being Brilliant:-
Computer test (Array) Time:- 1 hour
Section A - All questions compulsory
Section B – Attempt Any 2
Section A

1.  What is the difference between the linear search and the binary search technique? [2]

2. String x[ ] = {“Artificial intelligence”, “IOT”, “Machine learning”, “Big data”}; [2]


Give the output of the following statements:
(i) System.out.prindn(x[3]);
(ii) System.out.prindn(x.length);
3. Differentiate between searching and sorting. [2]
4. Consider the following String array and give the output [2]
String arr[]= {“DELHI”, “CHENNAI”, “MUMBAI”, “LUCKNOW”, “JAIPUR”};
System.out.println(arr[0] .length( )> arr[3] .length( );
System.out.print(arr[4] ,substring(0,3));
5 String x[ ] = {“SAMSUNG”, “NOKIA”, “SONY”, “MICROMAX”, “BLACKBERRY”}; [2]
Give the output of the following statements :
(i) System.out.prindn(x[1]);
(ii) System.out.println(x[3].length{ ));
Section B
6. Write a program to input 15 integer elements in an array and sort them in ascending order
using the selection sort technique. [15]
7. Write a program to accept name and total marks of N number of students in two single
subscript array name[] and totalmarks[ ].   [15]
Calculate and print:
(i) The average of the total marks obtained by N Number of students.
[average = (sum of total marks of all the students)/N]
(ii) Deviation of each student’s total marks with the average.
[deviation = total marks of a student – average] ‘
8. Write a program to input integer elements into an array of size 20 and perform the following
operations: [15]
(i) Display largest number from the array.
(ii) Display smallest number’from the array.
(iii) Display sum of all the elements of the array.

You might also like