- Write a program in C++ to read a file and to transfer the contents of the file to the printer with the line numbers.
For example,
1 this is a test
2 program
3 ——-
4 ——-
- Write a program in C++ to read students’ record such as name, sex, roll number, height, and weight from the specified file and to display in a sorted order (name is the key for sorting).