Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write statements that accomplish each of the following. Assume that the structure struct person { char lastName [ 1 5 ] ; char firstName [

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 theres 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

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions