- Program :
#include<stdio.h>
int main()
{
FILE *f1;
char c;
printf("\n----------------FILE MANAGEMENT----------------");
printf("\nData Input");
f1=fopen("Input","w");
while((c=getchar())!=EOF)
putc(c,f1);
fclose(f1);
printf("\nData Output");
f1=fopen("Input","r");
while((c=getc(f1))!=EOF)
printf("\n%c",c);
fclose(f1);
}
- Output :
No comments:
Post a Comment