61 A

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Experiment 61 a:

#include<stdio.h>
int main()
{
FILE *fs;
char ch,c[100]="MRITS";
clrscr();
fs=fopen("a.txt","r");
while(!feof(fs))
{
ch=fgetc(fs);
printf("%c",ch);
}
fclose(fs);

fs=fopen("a.txt","a");
fprintf(fs,"%s",c);
fclose(fs);

fs=fopen("a.txt","r");
while(!feof(fs))
{
ch=fgetc(fs);
printf("%c",ch);
}
fclose(fs);

getch();
return 0;
}

You might also like