请输入您要查询的百科知识:

 

词条 getchar
释义

§ 词条解释

函数名: getchar

功 能: 从stdin流中读字符

用 法: int getchar(void);

程序例:

#include <stdio.h>

int main(void)

{

int c;

/* Note that getchar reads from stdin and

is line buffered; this means it will

not return until you press ENTER. */

while ((c = getchar()) != '\')

printf("%c", c);

return 0;

}

/*********************************************/

函数名:fflush(stdin)

功能 :清理缓存区内容

§ 相关条目

计算机; 程序; 语言; 编程; C++ ; 函数

随便看

 

百科全书收录594082条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2025/2/22 5:25:30