What is the output of the following code?

```
#include
#include
using namespace std;

int main()
{
ofstream output;

// Create a file
output.open("scores.txt");

// Write two lines
output << "John" << " " << "T" << " " << "Smith"
<< " " << 90 << endl;
output << "Eric" << " " << "K" << " " << "Jones"
<< " " << 85;

output.close();

ifstream input;

// Open a file
input.open("scores.txt");

// Read data
char firstName[80];
char mi;
char lastName[80];
int score;
input >> firstName >> mi >> lastName >> score;
double sum = score;

input >> firstName >> mi >> lastName >> score;
sum += score;

cout << "Total score is " << sum << endl;

input.close();

return 0;
}
```


Total score is 175

Computer Science & Information Technology

You might also like to view...

The networking cables for a new building are being installed. You are asked to prepare a study about which cable type(s) should be used. Discuss the issues related to the cable selection.

What will be an ideal response?

Computer Science & Information Technology

A theme is a prebuilt workbook used as a pattern for creating new workbooks

Indicate whether the statement is true or false

Computer Science & Information Technology

To summarize data in a set of records, you use a family of functions called ____ functions.

A. aggregate B. summary C. statistical D. group

Computer Science & Information Technology

?Which of the following is NOT an encryption algorithm used by SSH?

A. ?SHA-2 B. ?DES C. ?RSA D. ?Kerberos

Computer Science & Information Technology