Question: Write a program that reads students names followed by their test scores (5 scores) from the given input file, students.txt. The program should output to

Write a program that reads students names followed by their test scores (5 scores) from the given input

file, students.txt. The program should output to a file, output.txt, each students first name, last name,

followed by the test scores and the relevant grade. All data should be separated by a single space.

Student data should be stored in a struct variable of type StudentType, which has four components:

studentFName and studentLName of type string, an array of testScores of type int and grade of type

char. Suppose that the class has 20 students. Use an array of 20 components of type StudentType.

Your program must contain at least the following functions:

1. A function to read the students data into an array.

2. A function to assign the relevant grade to each student.

Moreover, other than declaring the variables and opening the input and output files, the function main

should only be a collection of function calls. Use constants where needed. You MUST use structs, an

array of the struct, and an array inside the struct for the scores

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!