Hi,
Please help me write this C code as i am clueless and helpless in C programming
Write a C program, which allows the user to enter a valid filename and then prints the file content to screen, two lines at a time. The program should pause after displaying the first two lines, after which the user could either hit the ‘Q’ key to exit the program or ‘ENTER’ key to continue to print the subsequent two lines to the screen, until the end of file.
For example, if the text file contains:
Welcome to Hilton Hotel
The best hotel for all your needs
Book Hotel Now
then the following will be printed on screen:
Welcome to Hilton Hotel
The best hotel for all your needs
Hit ‘Q’ to exit or ‘ENTER’ to continue.
If the user hits the ‘ENTER’ key, the following will be printed on screen:
Book Hotel Now
If the user hits the ‘Q’ key, the following will be printed on screen:
Program exited before end of file
Thanks in advance