subject

Just complete the program where it say fill in the code.#include // fill in directive for files#include #include using namespace std; // this program reads records from a file. the file contains the// following: student's name, two test grades and final exam grade.// it then prints this information to the screen. const int namesize = 15; const int maxrecords = 50; struct grades // declares a structure{char name[namesize + 1]; int test1; int test2; int final; }; typedef grades gradetype[maxrecords]; // this makes gradetype a data type// that holds maxrecords// grades structures.// fill in the code for the prototype of the function readit// where the first argument is an input file, the second is the// array of records, and the third will hold the number of records// currently in the array. int main(){ifstream indata; indata. open("graderoll. dat"); int numrecord; // number of records read ingradetype studentrecord; if(! indata){cout < < "error opening file. \n"; cout < < "it may not exist where indicated" < < endl; return 1; }// fill in the code to call the function readit.// output the informationfor (int count = 0; count < numrecord; count++){cout < < studentrecord[count].name < < setw(10)< < studentrecord[count].test1< < setw(10) < < studentrecord[count].test2; cout < < setw(10) < < studentrecord[count].final < < endl; }return 0; } readit task: this procedure reads records into an array of// records from an input file and keeps track of the// total number of records// data in: data file containing information to be placed in// the array// data out: an array of records and the number of recordsvoid readit(// fill in the code for the formal parameters and their// data types.// indata, graderec and total are the formal parameters// total is passed by reference){total = 0; indata. get(graderec[total].name, namesize); while (indata){// fill in the code to read test1// fill in the code to read test2// fill in the code to read finaltotal++; // add one to total// fill in the code to consume the end of line// fill in the code to read name}}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Avariable definition defines the name of a variable that will be used in a program, as well as
Answers: 3
question
Computers and Technology, 22.06.2019 21:00
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
Just complete the program where it say fill in the code.#include // fill in directive for files#incl...
Questions
question
English, 24.11.2020 01:40
question
Mathematics, 24.11.2020 01:40
Questions on the website: 13722367