#include<stdio.h>
#include<conio.h>
void main()
{
FILE *fp;
char *p,data[20];
fp=fopen("file.txt","r");
while((p=fgets(data,40,fp))!=NULL)
{
printf("%s\n",data);
}
fclose(fp);
}
#include<conio.h>
void main()
{
FILE *fp;
char *p,data[20];
fp=fopen("file.txt","r");
while((p=fgets(data,40,fp))!=NULL)
{
printf("%s\n",data);
}
fclose(fp);
}
No comments:
Post a Comment