Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions