在putchar(getchar())这怎么不输出a而是b呢?
请问:在putchar(getchar())这怎么不输出a而是b呢?
#include "stdio.h"
main()
{
char ch;
printf("Please input two character: ");
ch=getchar(); /*输入1个字符并赋给ch */
putchar(ch);putchar('\n');
putchar(getchar()); /*输入一个字符并输出*/
putchar('\n');
}
程序运行情况如下:
Please input two characters: ab↙
a
b