1. Write a C/C++ program that reads text from a file and prints on the terminal each input line, preceded by the line number. The output will look like -
- 1 This is the first trial line in the file,
- 2 and this is the second line.
2. Write a C/C++ program that reads text from a file, then count and prints the number of line exist in the inputted text file.
3. Write a C/C++ program that reads text from a file, then delete the existing comment and save the output text file (without comment). Also count and print the number of deletion.
5. Write a C/C++ program that reads text from a file, then delete the existing tabs (spaces) and new line and save the output text file. Also count and print the number of deletion.
7. Write a C/C++ program that reads text from a file and prints on the terminal each input line, preceded by the line number. The output will look like -
- 1 This is the first trial line in the file,
- 2 and this is the second line.