The ________ loop checks the condition before executing the block of code.
- do-while
- for
- if
- while
The "do-while" loop is used in programming to check the condition after executing the block of code at least once. It guarantees that the loop body is executed at least once, as the condition is evaluated after the first iteration. On the other hand, "for" and "while" loops check the condition before entering the loop, and "if" is used for conditional statements, not loops.
Loading...
Related Quiz
- What does the strlen function from the C standard library do?
- You need to create a program that dynamically allocates memory for an array and allows the user to specify the size of the array at runtime. What concept in C would be crucial to achieve this?
- The size of a structure in memory is determined by the ________ of its members.
- In C, the ________ function is used to write a string to a file.
- What is a double pointer in C?