关于字符数据的输入问题
在做一个例题时,有一个语句while (getchar()!='\n') 我想问下为什么输入的字符不用存进一个字符变量中,如果没有存进内存中,怎么和'\n'比较
2014-08-31 20:53
2014-08-31 21:00
2014-08-31 21:05

2014-08-31 21:07
2014-08-31 21:13
2014-08-31 21:59

2014-08-31 22:06
程序代码:#include "stdio.h"
void main ()
{
while (getchar()!='\n')
{
putchar(getchar());
}
}
2014-09-01 09:03
2014-09-01 09:42

2014-09-01 09:50