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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 08:00, leleee10
Which argument is not a valid filter? does not equal this quarter filter by cell color all of these are valid filter arguments.
Answers: 2
image
Computers and Technology, 23.06.2019 21:00, shyshy1791
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
image
Computers and Technology, 24.06.2019 06:30, hannahgracew12
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
image
Computers and Technology, 24.06.2019 06:50, emmv565628
What are the things you are considering before uploading photos on social media?
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 in other subjects:

Konu
Mathematics, 22.02.2021 19:40
Konu
Social Studies, 22.02.2021 19:40
Konu
Health, 22.02.2021 19:40