Question: Programming l n C Lab 6 B / 7 B Objective To gain experience in the use of pointers, structures, and dynamic memory allocation, multiple

Programming lnC
Lab 6B/7B
Objective
To gain experience in the use of pointers, structures, and dynamic memory allocation, multiple file program,
input/output redirection.
Assignment
Write a program to input names and addresses that are in alphabetic order and output the names and
addresses in zip code order. You could assume maximum of 50 names.
The program should be modalized and well documented. You must:
Use a structure for names and address information
Allocate storage dynamically for each structure (dynamic memory allocation)
Use input/output redirection
Use an array of pointers to structures; Do NOT use an array of structures
Use multiple file format; header file, multiple .c files
Sort the zip codes in ascending order
Use the data file assigned
You may use any functions in this lab. No global variables.
Input
Data file contains 4 records (lines) for each name and address as follows:
First line: Lastname, Firstname
Second line: Street address
Third line: , City and State
Fourth line: Zipcode
Output
The names and addresses in zip code order with the above format.
Run
Run the program with the input file assigned. Run the program on the command line using input/output
redirection:
> Lab6b7b.exe lab6b7b_input.txt > lab6b7b_output.txt
Turn In
Turn in source code (header file, multiple .c files), input file and output file.
 Programming lnC Lab 6B/7B Objective To gain experience in the use

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!