C Programming 2022 Solution New Syllabus

Uncategorized

11.

12.

 

13.

The main difference between a while loop and a do-while loop lies in when the loop condition is checked:

  1. While Loop:
    • In a while loop, the condition is checked before the loop body is executed.
    • If the condition is false initially, the loop body will not execute at all.
  2. Do-While Loop:
    • In a do-while loop, the condition is checked after the loop body is executed.
    • This guarantees that the loop body will execute at least once, even if the condition is false initially.

 

 

14.

 

15.

 

Leave a Reply

Your email address will not be published. Required fields are marked *