Initialize nameage.dat with 100 records that store values lastName ="unassigned", firstName = "" and age = 0.

What will be an ideal response?

```
// fstream object "fileObject" corresponds to file nameage.dat
Person blankPerson;
blankPerson.setLastName("unassigned");
blankPerson.setFirstName("");
blankPerson.setAge("0");
blankPerson.id = 0;
for (size_t r{0}; r < 100; r++) {
fileObject.write(reinterpret_cast(&blankPerson),
sizeof(Person) );
}
```

Computer Science & Information Technology

You might also like to view...

A hard disk drive provides ________ storage so data is retained after the power is turned off

Fill in the blank(s) with correct word

Computer Science & Information Technology

Bridges are used to route data between two different networks

Indicate whether the statement is true or false

Computer Science & Information Technology