Home / Programming MCQs / C Programming MCQs / Question

M

Mohini Yadav • 27.60K Points
Instructor II

Q. How many times do we get through the following loop?

Code:
int c = 10;

while (( c <11 ) { 
  printf("Hello World\n"); 
}
(A) 0
(B) 1
(C) 9
(D) it is an infinite loop
Explanation by: Mohini Yadav
while (( c <11 ) {...}
We tell the computer “As long as the condition is true (10 < 11), repeat the instructions between braces”.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.