C032Branching and Looping • Loops
Most ImportantMedium
Q1.Which loop is guaranteed to execute its body AT LEAST ONCE?
A
for
B
while
C
do-while
Correct answer
D
if
Correct answers are highlighted in green
for(i = 1; i <= 5; i++)break statement inside a loop:int i = 0; while(i < 3){ printf("%d", i); i++; }if-else statement, the else block executes when the condition is:for loop?for(i = 0; i < 10; i++)int i = 5; while(i > 0){ printf("%d", i); i--; }if(5) printf("Yes"); else printf("No");for(i = 1; i <= 10; i += 2)for(i = 0; i < 3; i++); printf("%d", i);while(0); execute?while(0) { ... } execute?int i = 1; do{ printf("%d", i); i++; } while(i <= 3);for( ; ; ) will:if-else without braces, an else matches with the: