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

Counting Iterations of Nested Loops

C code walkthrough · Question 44
easyLoops

Code

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

Your answer