问题描述:
#include
main()
{ long nc;
nc=0;
while(getchar()!=EOF)++nc;
printf("%ld\n",nc);
}
运行程序时,键盘输入内容:Hello,world!
运行结果输出是:_____________
我做的答案是12.而答案给的是11.
真是不懂啊~注意:world后有“!”(惊叹号).Hello和world中间有“,”(逗号).我感觉问题可能出在这“!”上.
main()
{ long nc;
nc=0;
while(getchar()!=EOF)++nc;
printf("%ld\n",nc);
}
运行程序时,键盘输入内容:Hello,world!
运行结果输出是:_____________
我做的答案是12.而答案给的是11.
真是不懂啊~注意:world后有“!”(惊叹号).Hello和world中间有“,”(逗号).我感觉问题可能出在这“!”上.
问题解答:
我来补答展开全文阅读