C Programming
#include
#include
void main()
{
clrscr();
char *fname,*str;
FILE *fp;
// printf("Enter a file name with address:");
// gets(fname);
fp=fopen("c:\\billa.tr","w");
fputs("bellal hossain ",fp);
fclose(fp);
fp=fopen("c:\\billa.tr","r");
fgets(str,20,fp);
printf("%s",str);
getch();
}
0 comments:
Post a Comment