c的putchar
图中箭头怎么来的?#include "stdio.h"
main(){
char c=getchar();
while (c!=EOF){
putchar(c);
c=getchar();
}
return 0;
}
输入的字符最后一个虽然数回车,但遇到EOF不是就结束了吗,怎么会多个箭头 MSDN说:The return value is EOF for an error or if the end-of-file character or the end-of-string character is encounteredin the first attempt to read a character.
// Ctrl+Z必须是输入行第一个字符
而撸主输入的Ctrl+z对应输入的ASCII码对应的就是右箭头 (Ctrl+Y就是↓,详情请查看ASCII码表)
n0noper 发表于 2016-3-16 08:33
MSDN说:The return value is EOF for an error or if the end-of-file character or the end-of-string ch ...
谢谢鱼油
页:
[1]