SOURCE CODE:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
main()
{
char ch;
FILE *file;
file = fopen("abc.txt", "w");
printf("\nEnter any character into FILE: ");
scanf("%c", &ch);
putc(ch, file);
fclose(file);
file = fopen("abc.txt", "r");
ch = getc(file);
printf("\nEntered Character from FILE: %c", ch);
}