#include <stdio.h>
int main() {
for (char c=0; c<128; c++) {
printf("%c", c);
}
}
代码的输出会一遍又一遍地打印整个字符列表.
但我也试着运行这段代码:
#include <stdio.h>
int main() {
for (char c=0; c<127; c++) {
printf("%c", c);
}
}
The only change being the condition. It now runs fine without entering an infinite loop.
What is the reason for this?