Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

What is cultural tourism and why is it growing?

Answered: 1 week ago

Question

Does it avoid using personal pronouns (such as I and me)?

Answered: 1 week ago

Question

Does it clearly identify what you have done and accomplished?

Answered: 1 week ago