0% found this document useful (0 votes)
33 views3 pages

Second Semester Prelims Class 11

The document contains a prelim exam for grade 11 computer science. It has two sections - Section A with multiple choice questions worth 30 marks and Section B with programming questions worth 20 marks. Section A contains questions on method overloading, arrays, and binary operations. Section B asks to write programs to sort arrays in different ways, separate arrays into even and odd elements, and find prime numbers in an array.

Uploaded by

ashley mathew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views3 pages

Second Semester Prelims Class 11

The document contains a prelim exam for grade 11 computer science. It has two sections - Section A with multiple choice questions worth 30 marks and Section B with programming questions worth 20 marks. Section A contains questions on method overloading, arrays, and binary operations. Section B asks to write programs to sort arrays in different ways, separate arrays into even and odd elements, and find prime numbers in an array.

Uploaded by

ashley mathew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Prelims-1(2022-23)

Grade – 11(Computer)
Name: ____________________ Date:01/03/2023
Roll No: ___________ Marks: 50

Time allowed : One Hour


(Section A- 30 Marks)

Question 1:MCQ [5]


1. A method with many definitions is called:

1. multiple method
2. method overloading
3. floating method
4. none

2. A method may be associated with:

1. return
2. call
3. promote
4. none

3. Which of the following type can be used for a non-returnable method?

1. int
2. float
3. double
4. void

4. A method is invoked through an:

1. object
2. system
3. parameter
4. none

5. The elements of array[50] are numbered:

1. from 1 to 50
2. from 0 to 49
3. from 1 to 51
4. none

Question 2: Predict the output [5]

6.class factorial

int n;

public void fact(int x)

int f=1;

for(i=1;i<=n;i++)

f=f*i:

System.out.println(“Factorial of “+x +”is”+f);

Public static void main()

int n=5, m=8;

factorial ob=new factorial();

ob.fact();

ob.fact(m)

7.Write an algorithm for searching an element from the entered array elements. [5]
8. Solve the following [5]

i) (1101111)2 + (1011011)2

ii) (1111011)2 + (1011101)2

iii) (110101)2 - (011010)2

iv) (101011)2 - (11101)2

v) (11111)2 - (01101)2

Section B

9. Programmes(Any Two) [20]

1. Write a program in Java to store 10 numbers (including positive and negative numbers) in a
Single Dimensional Array (SDA). Display all the negative numbers followed by the positive
numbers without changing the order of the numbers.

2. Write a program in Java to store 20 numbers in a Single Dimensional Array (SDA). Display the
numbers which are prime.

3. Write a program to accept a list of 20 integers. Sort the first 10 numbers in ascending order and
next the 10 numbers in descending order by using 'Bubble Sort' technique. Finally, print the
complete list of integers.
4. Write a program in Java to accept 20 numbers in a single dimensional array arr[20]. Transfer
and store all the even numbers in an array even[ ] and all the odd numbers in another array
odd[ ]. Finally, print the elements of both the arrays.

You might also like