for循环中的小疑问

Qui*_*tic 1 c c++ loops

在以下代码段中将测试多少次'x'值?

int x;
for(x=0;x < 10; x++)
   printf("%d",x);
Run Code Online (Sandbox Code Playgroud)

对我来说似乎答案是11但我的模块说它是10?我错过了什么?

Ple*_*and 8

十一,在每次循环迭代开始时测试条件,在调用printf之前:

0 < 10 == true
1 < 10 == true
2 < 10 == true
3 < 10 == true
4 < 10 == true
5 < 10 == true
6 < 10 == true
7 < 10 == true
8 < 10 == true
9 < 10 == true
10 < 10 == false    // exit from loop (printf not executed)
Run Code Online (Sandbox Code Playgroud)