CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Do-While Runs at Least Once

C code walkthrough · Question 21
mediumLoops

Code

Read carefully. What does this print?
1#include <stdio.h>
2int main() {
3 int count = 0, n = 0;
4 do {
5 count++;
6 n--;
7 } while (n > 0);
8 printf("%d\n", count);
9 return 0;
10}

Your answer