CPP MCQ - Control Flow Statements PDF
CPP MCQ - Control Flow Statements PDF
5. A switch construct can be used with which of the following types of variable?
(A) int (B) int, char (C) int, float, char (D) Any basic datatype
9. If the variable count exceeds 100, a single statement that prints “Too
many” is
(A) if (count<100) cout << “Too many”;
(B) if (count>100) cout >> “Too many”;
(C) if (count>100) cout << “Too many”;
(D) None of these.
11. for (; ;)
(A) means the test which is done using some expression is always true
(B) is not valid
(C) will loop forever
YK
(D) should be written as for( )
ANS: 1. A 2. D 3. A 4. B 5. B 6. A 7. A 8. B
9. C 10. D 11. C 12. B
YK