Discussion: Say It Again—Or Not
Execute the code to understand the output and gain insights into do-while loops.
We'll cover the following...
Run the code
Now, it's time to execute the code and observe the output:
Press + to interact
#include <stdio.h>int main(){int a = 11;do{printf("a = %d\n", a);a--;}while(a<10);return(0);}
Understanding the output
The loop repeats once despite the value of variable a
being greater than the loop’s terminating condition:
a = 11
Code output
Explanation
...