C - Control Flow Constructions Questions and Answers

Practice Mode
Showing 10 of 62 questions
Q11
 The minimum number of times the while loop is executed is 
  • A 0
  • B 1
  • C 2
  • D cannot be predicted
Answer: Option A
Q12
 The minimum number of times the do-while loop executed is 
  • A 0
  • B 1
  • C 2
  • D cannot be predicted
Answer: Option A
Q13
 The minimum number of times  the do-while loop executed is 
  • A 0
  • B 1
  • C 2
  • D cannot be predicted
Answer: Option B
Q14
 The do-while loop is terminated when the conditional expression returns
  • A zero
  • B 1
  • C non-zero
  • D -1
Answer: Option A
Q15
 Which conditional expression always returns false value ?
  • A if (a = = 0)
  • B if (a = 0)
  • C if (a = 10)
  • D if (10 = = a)
Answer: Option B
Q16
 Which conditional expression always returns true value ?
  • A if (a = 1)
  • B if (a = = 1)
  • C if (a = 0)
  • D if (1 = = a)
Answer: Option A
Q17
 What is (are) the statement(s) which results in infinite loop ?
  • A for (i = 0;; i++);
  • B for (i = 0;;);
  • C for (;;);
  • D all the above
Answer: Option D
Q18
 In the following loop construct, which one is executed only one always.  for (expr1; expr2; expr 3) { ....}
  • A expr1
  • B expr3
  • C expr1 and expr3
  • D expr1, expr2 and expr3
Answer: Option A
Q19
 Identify the wrong construct. 
  • A for (expr1; expr2;)
  • B for (expr1; expr3)
  • C for (; expr;)
  • D for (;; expr3)
Answer: Option B
Q20
 Infinite loop is 
  • A useful for time delay
  • B useless
  • C used to terminate execution
  • D not possible
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test