C - Control Flow Constructions
C - Control Flow Constructions
14. The do-while loop is terminated when the conditional expression returns
- zero
- 1
- non-zero
- -1
15. Which conditional expression always returns false value ?
- if (a = = 0)
- if (a = 0)
- if (a = 10)
- if (10 = = a)
16. Which conditional expression always returns true value ?
- if (a = 1)
- if (a = = 1)
- if (a = 0)
- if (1 = = a)
17. What is (are) the statement(s) which results in infinite loop ?
- for (i = 0;; i++);
- for (i = 0;;);
- for (;;);
- all the above
18. In the following loop construct, which one is executed only one always.
for (expr1; expr2; expr 3) { ....}
for (expr1; expr2; expr 3) { ....}
- expr1
- expr3
- expr1 and expr3
- expr1, expr2 and expr3
19. Identify the wrong construct.
- for (expr1; expr2;)
- for (expr1; expr3)
- for (; expr;)
- for (;; expr3)
20. Infinite loop is
- useful for time delay
- useless
- used to terminate execution
- not possible