Question: Write a program that creates a file called test.dat. It then allows you to enter the names and address of a number of persons. For

Write a program that creates a file called test.dat. It then allows you to enter the names and address of a number of persons. For each person it allows you to input the name and address, it computes the length of the names and address and writes in the file test.dat, the length of the name, the name, the length of the address and the address.It also displays the name, the size of the name, the address and the size of the address for the person with the longest name as well as for the person with the longest address. The program should also display the average size of names and average size of addresses in the file.

You have to write the program in C language and use System calls.You have been requested to use open(), read(), write()etc. Do not use fopen(),fread(), fwrite().Thanks.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!