a. Using the gets() and fputs() functions, write a C programthat reads a single line of text from the keyboard and writes it toa new file called output.txt.
b. Modify your program in part (a) such that it accepts multiplelines of text from the keyboard and writes each line to a filenamed “text.dat” until an empty line is entered.
This must be in C (stdio and stdlib)