Problem

(Write Statements to Accomplish a Task) Write statements that accomplish each of the follo...

(Write Statements to Accomplish a Task) Write statements that accomplish each of the following. Assume that the structure

struct person {

char lastName[15];

char firstName [15]

char age[4];

};

has been defined and that the file is already open for writing.

a) Initialize the file "nameage.dat" so that there are 100 records with lastName = "unassigned", firstname = "" and age = "0".

b) Input 10 last names, first names and ages, and write them to the file.

c) Update a record; if there's no information in the record, tell the user "No info".

d) Delete a record that has information by reinitializing that particular record.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 11
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT