subject
Engineering, 21.12.2020 16:20 biba54

Files as Parameters and Character Data Retrieve program Grades. cpp and the data file graderoll. dat from the Lab 11 folder. The code is as follows: // 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 to store information from file { char name[NAMESIZE + 1]; int test1; int test2; int final; }; typedef Grades gradeType[MAXRECORDS]; // This makes gradeType a data type that holds MAXRECORDS // 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 to read in gradeType 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 information for (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; } // //This procedure reads records into an array of records from an input file and //keeps track of the total number of records //Declare inData: data file containing information to be placed in the array Page 63 of 80 //Declare dataout: an array of records and the number of records // void 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 // re

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
For the closed feedwater heater below, feedwater enters state 3 at a pressure of 2000 psia and temperature of 420 °f at a rate of ix10 ibhr. the feedwat extracted steam enters state 1 at a pressure of 1000 psia and enthalpy of 1500 btu/lbm. the extracted er leaves at an enthalpy of 528.7 btu/lbm steam leaves as a saturated liquid. (16) a) determine the mass flow rate of the extraction steam used to heat the feedwater (10) b) determine the terminal temperature difference of the closed feedwater heater
Answers: 3
question
Engineering, 04.07.2019 18:10
Condition monitoring is a major component of. (clo4) a)- predictive maintenance. b)-preventive maintenance c)-proactive maintenance d)-reactive maintenance.
Answers: 1
question
Engineering, 04.07.2019 18:20
Find the kinematic pressure of 160kpa. for air, r-287 j/ kg k. and hair al viscosity of air at a temperature of 50°c and an absolute (10 points) (b) find the dynamic viscosity of air at 110 °c. sutherland constant for air is 111k
Answers: 3
question
Engineering, 04.07.2019 19:10
Estimate the change in specific internal energy au and specific enthalpy h from inlet to outlet for ethylene glycol (a liquid) flowing through each of the following devices: (a) a heat exchanger where the glycol temperature increases from 20 °c to 80 °c; (b) a pump operating at about 25 °c and increasing the glycol pressure from 100 kpa to 8 mpa.
Answers: 2
You know the right answer?
Files as Parameters and Character Data Retrieve program Grades. cpp and the data file graderoll. dat...
Questions
question
Social Studies, 13.10.2020 03:01
Questions on the website: 13722362