getchar
常見(jiàn)例句
- The standard library provides several functions for reading or writing one character at a time, of which getchar and putchar are the simplest.
標(biāo)準(zhǔn)庫(kù)提供了一次讀/寫(xiě)一個(gè)字符的函數(shù),其中最簡(jiǎn)單的是getchar和putchar兩個(gè)函數(shù)。 - printf("%d ",a[i]); printf("\n"); getchar(); return 0;
作者:佚名技巧來(lái)源:不詳點(diǎn)擊數(shù):更新時(shí)間:2008-5-17 - Note that getchar reads from stdin and is line buffered;this means it will not return until you press ENTER.
EOF作為行結(jié)束符時(shí)的情況,這時(shí)候輸入Ctrl D并不能結(jié)束getchar(),而只能引發(fā)getchar()提示下一輪的輸入。 - Each time it is called, getchar reads the next input character from a text stream and returns that as its value.That is, after c = getchar();
每次調(diào)用時(shí),getchar函數(shù)從文本流中讀入下一個(gè)輸入字符,并將其作為結(jié)果值返回。 返回 getchar