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

 

词条 fscanf
释义

§ 解释

函数名: fscanf

功 能: 从一个流中执行格式化输入

用 法: int fscanf(FILE *stream, char *format【,argument...】);

§ 程序例

#include <stdlib.h>

#include <stdio.h>

int main(void)

{

int i;

printf("Input an integer: ");

/* read an integer from the

standard input stream */

if (fscanf(stdin, "%d", &i))

printf("The integer read was: %i\",

i);

else

{

fprintf(stderr, "Error reading an \\

integer from stdin.\");

exit(1);

}

return 0;

}

随便看

 

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

 

Copyright © 2004-2023 Cnenc.net All Rights Reserved
更新时间:2024/9/21 20:45:57