C program to read data from keyboard and write it to a text file

OUTPUT: