#include<stdio.h>
int main()
{
FILE *anik;
anik = fopen("bc.txt", "r");
char ch[20], an[20], ar[20];
if(anik == NULL)
{
printf("File Does Not Exist\n");
}
else
{
printf("File is open\n");
fscanf(anik,"%s %s %s", &ch, &an, &ar);
printf("%s %s %s\n",ch, an, ar);
fclose(anik);
}
return 0;
}
int main()
{
FILE *anik;
anik = fopen("bc.txt", "r");
char ch[20], an[20], ar[20];
if(anik == NULL)
{
printf("File Does Not Exist\n");
}
else
{
printf("File is open\n");
fscanf(anik,"%s %s %s", &ch, &an, &ar);
printf("%s %s %s\n",ch, an, ar);
fclose(anik);
}
return 0;
}
Comments
Post a Comment