Question
Create a file named score.txt that holds the name, id, and score of each student in a course. Assume that the maximum enrollment in the
Create a file named score.txt that holds the name, id, and score of each student in a course. Assume that the maximum enrollment in the class is 30. The following is a sample file: Tom 1000 79.5 Alicia 3000 97.5 Ben 2000 87 Joaquin 1500 88 Susana 5000 70.55 Write a program named lab.cpp that reads a filename from a user. You will define a struct that is able to hold information about a single student. Then, you will declare an array of structs of the data type you create, and populate it with the information from the file. You program needs to displays the name, id, and score of each student in ascending order of ids. A sample run of your program might look like: Enter a file name: C:/CSS/score.txt Tom 1000 79.5 Joaquin 1500 88 Ben 2000 87 Alicia 3000 97.5 Susana 5000 70.55
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started