Question: C++ Display Alternate Lines of a File Write a program that asks a user for the name of a file. If no such file exist,
C++
Display Alternate Lines of a File Write a program that asks a user for the name of a file. If no such file exist, the program should display an error message; otherwise it should display the alternate lines in the file(lines with line numbers 1, 3, 5, ...) The corresponding line number should displayed before each line. (Using an editor, you should create a simple text file that can be used to text this program.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
