Computer Science 2 Past Papers 

[OBJECTIVE]

Subject: Computer Science-II

Time Allowed: 10 Minutes

Maximum Marks: 10

NOTE: Attempt this Paper on this Question Sheet only. Please encircle the correct option. Division of marks is given in front of each question. This Paper will be collected back after expiry of time limit mentioned above.

 

Part-I  Encircle the correct option, cutting and overwriting is not allowed. (10)

Part-I Encircle the correct option, cutting and overwriting is not allowed. (10)
1. To pick the odd out in C++ in the following:
(a) int (b) float
(c) void (d) double
2. Which of the following is used to print data of 5″ row 5″ column in a matrix a?
(a) cout<<a[5.5) — (b) cout<<a[4][4]
(c) cout<<a[6,6] (d) cout<<a(4)(4)
3. Which one is true for value of x if x = 1 +and()%10; then x will be in the range of?
(a) 0 to 99 (b) I to 100
(c) 0to9 (d) 1to 10
4. What is output for the statements: for (int i =0; i<=5; i= i+2) cout<<j<<” “;
(a) 0 2 4 (b) 0 2 4 6
(c) 0 2 4 5 (d) 0 1 2 3 4 5
5. How many total elements are there for matrix k such that: int k{5)[4);
(a) none (b)9
(c) 20 (d) 21
6. If x =12 and y= 6, then for statement * x = = 2*x – 4*y” which result is true
(a} 0 (b) 48
(c) true (d) none
7. Which type is best suited to represent the integer values?
(a) int (b) double
(c) float (d) all of the mentioned
8. The output of program void main() { int a(3}[3]={ (6,7,8},{3,9,10},¢11.22,33}}; cout<<a[2]{ 1}; getch(); } is given by:
a) 22 (b) 7
(c) 3 (d) 9
(e) 33
9. If a= 5 for b= at+; and c = ++a; then which of the following is correct:
(a) a, b and c are all equal (b) a and b are equal
(c) a and c are equal (d) none
10. Pick the odd one out in C++:
(a) int, char, void (b) for, while
(c) switch, while (d) none

500+ Past Papers – Computer Science