Bird
0
0

Which of the following is true about the while loop in C?

easy📝 Conceptual Q2 of 15
C - Loops
Which of the following is true about the while loop in C?
AIt executes the loop body exactly once
BIt always executes the loop body at least once
CIt can execute zero or more times depending on the condition
DIt executes the loop body a fixed number of times
Step-by-Step Solution
Solution:
  1. Step 1: Recall how while loop works

    The while loop runs as long as the condition is true.
  2. Step 2: Understand execution count possibilities

    If the condition is false initially, it runs zero times; otherwise, it can run many times.
  3. Final Answer:

    It can execute zero or more times depending on the condition -> Option C
  4. Quick Check:

    While loop execution count = zero or more [OK]
Quick Trick: While loop may run zero times if condition false initially [OK]
Common Mistakes:
  • Thinking it always runs once
  • Confusing with for loop behavior

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes