I need help writing this C program (not C++) This program needs horizontal & ver
ID: 3624807 • Letter: I
Question
I need help writing this C program (not C++)This program needs horizontal & vertical spacing
14 a
Program L14b
Write a C program what will open a sequential data file in the root directory of the current drive. Name this file myfile.txt.
Open the file in the root directory of the current drive (the current drive might not be the C: drive). The name of the file should be: myfile.txt
Be sure you verify that the file opened properly before you output data to the file.
If the file did NOT open properly, display an error message and terminate the program by dropping to the bottom of the source file.
else (the file did open properly):
Output the following three sentences (each in a line of its own) using three fprintf statements:
“My dog has fleas, but they will be gone today.”
“Every good boy does fine.”
“Frequent action causes excellence.”
Close the file.
Display a message telling the user the name of the file that the data is stored in. Be sure you add a NL at the end of your message
Exit the program