Question with Answer MCA
1. The following program fragment, if (a = 0) printf (“a is zero”) ; else printf (“a is not zero”) ; results in the printing of
(a) a is zero
(b) a is not zero
(c) noting
(d) garbage
Ans. c
2. If y is of integer type, then the expressions 3*(y – 8) / 9 and (y – 8) / * 3 yield the same value, if
(a) y is an even number
(b) y is an odd number
(c) y-8 is an integral multiple of 9
(d) y-8 is an integral multiple of 3
Ans. c
3. If the integer needs two bytes of storage, then maximum value of an unsigned integer is
3. If the integer needs two bytes of storage, then maximum value of an unsigned integer is
(a) 216 – 1
(b) 215 – 1
(b) 215 – 1
(c) 216
(d) 215
(d) 215
Ans. a
4. The minimum number of temporary variables needed to swap the contents of two variables is
(a) 1
(b) 2
(b) 2
(c) 3
(d) 0
(d) 0
Ans. a
5. Which is true of conditional compilation?
(a) It is taken care of by the compiler
(b) It is setting the compiler option conditionally
(c) It is compiling a program based on a condition
(d) It is operation taken by the compiler
Ans. c
6. The basic arithmetic operation performed by a computer is
(a) addition
(b) mulitiplication
(c) subtraction
(d) division
Ans. a
7. The base of the binary number system is
7. The base of the binary number system is
(a) 2
(b) 16
(b) 16
(c) 8
(d) 10
(d) 10
Ans. a
8. Main memory unit of computer
(a) performs arithmetic
(b) stores a small amount of data and instructions
(c) stores bulk of data and instructions
(d) supervises the working of all the units
Ans. b
9. A Central Processing Unit (CPU) consist of
(a) input, output unit
(b) memory unit
(c) arithmetic and logical unit, central unit
(d) keyboard, printer
Ans. c
10. He was heart broken... her indifference ... him.
10. He was heart broken... her indifference ... him.
(a) at, to
(b) by, for
(b) by, for
(c) by, to
(d) at, on
(d) at, on