主观

将文本文件r.txt中的字符逐一读出并显示在屏幕上。

#include< stdio.h>

#include< stdlib.h>

void main()

{

FILE*fp

char ch;

if((fp fopen("r. txt",______))==NULL)/*第一空*/

{

printf("can't open file! \n"); exit(0);

}

printf("读文件并显示:\n");

while(! feof(fp))

{

ch= fgetc(fp);

printf("%c",_____);/*第二空*/

}

printf("\n");

fclose(_______);/*第三空*/

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服