Create a text file (w/o using any C++ program) containing the names of students and their marks in the following format:

Ajay 350
Vijay 340

where name and marks are separated by either a space or a tab and end of line is a record separator. Write a program to read this file and display the records in two columns name and marks.
Within the name column, the students’ names are to be left justified and marks are to be right justified in the marks column.

Recommended Answers

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.