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

Post-Increment in the Loop Test

C code walkthrough · Question 34
hardLoops

Code

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

Your answer