Sunday 21 January 2018

Program for Read File


Program for Read File
#include<stdio.h>
#include<conio.h>
main()
{
FILE *fp;
char ch;
clrscr();
fp=fopen("sunil.c","r");
if(fp==NULL)
{
printf("file not found.....");
}
else
{
while(!feof(fp))
{
ch=fgetc(fp);
printf("%c",ch);
delay(1000000);
}
}
getch();
fclose(fp);
}�

0 comments:

Post a Comment