Â
#include <stdio.h>
void main()
{
FILE *fptr;
char ch;
printf(" Enter any character: ");
scanf("%c", &ch);
fptr = fopen("sample.txt", "w");
putc(ch, fptr);
fclose(fptr);
fptr = fopen("sample.txt", "r");
ch = getc(fptr);
printf(" Character: %c", ch);
}
//.....coded by ANANYA MAURYA
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP