读书人

这东西杂整?该怎么处理

发布时间: 2012-04-03 12:38:19 作者: rapoo

这东西杂整?
There is a test file: c:\example.txt. Please write a program to print the content of the file to screen. Use standard C language and library.





[解决办法]
#include <stdio.h>
void main()
{
char ch;
FILE *pf=fopen( "c:/example.txt ", "r ");
ch = fgetc(pf);
while(ch != EOF){
putchar(ch);
ch = fgetc(pf);
}

fclose(pf);
}

读书人网 >C语言

热点推荐