#include <stdio.h>
#include <stdlib.h>
main (int argc,char *argv[])
{
char ch;
FILE *fp;
int i;
if((fp=fopen("test.txt","r"))==NULL)
{
printf("Can not open the file:
");
exit(0);
}
while((ch=fgetc(fp))!=EOF)
putchar(ch);
fclose(fp);
}
#include <stdio.h>
#include <stdlib.h>
main (int argc,char *argv[])
{
char ch;
FILE *fp;
int i;
if((fp=fopen("test.txt","r"))==NULL)
{
printf("Can not open the file:
");
exit(0);
}
while((ch=fgetc(fp))!=EOF)
putchar(ch);
fclose(fp);
}