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 a maximum of 50 names. The program should be modalized and well documented. You must: 1. Use a structure for names and address information 2. Allocate storage dynamically for each structure (dynamic memory allocation) 3. Use command line arguments 4. Use files; no input/output redirection 5. Use an array of pointers to structures; Do NOT use an array of structures 6. Use multiple file format; header file, multiple .c files 7. Sort the zip codes in ascending order 8. Use the data file assigned Name of input and output files are entered on the command line. The program should read address information from the input file and output them to an output file. 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: Second line: Third line: Fourth line: Output The names and Lastname, Firstname Street address City and State Zipcode in zip order with the above format. Run Run the program with the input file assigned. Run the program on the command line: Lab8.exe lab8_input.txt lab8_output.txt Turn In Turn in source code (header file, multiple .c files), input file and output file.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.3: Random File Access
Problem 6E
icon
Related questions
Question
Please help me with this code. The code needs to consists of one header file and two c files . Must use the command line to run the program. Below is the input.txt file that needs to be used. Please provide output and the source code for each file in the program. A1, A2 20294 Lorenzana Dr Woodland Hills, CA 91364 B1, B2 19831 Henshaw St Culver City, CA 94023 C1, C2 5142 Dumont Pl Azusa, CA 91112 D1, D2 20636 De Forest St Woodland Hills, CA 91364 A1, A2 20294 Lorenzana Dr Woodland Hills, CA 91364 E1, E2 4851 Poe Ave Woodland Hills, CA 91364 F1, F2 20225 Lorenzana Dr Los Angeles, CA 91111 G1, G2 20253 Lorenzana Dr Los Angeles, CA 90005 H1, H2 5241 Del Moreno Dr Los Angeles, CA 91110 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 J1, J2 5135 Quakertown Ave Thousand Oaks, CA 91362 K1, K2 720 Eucalyptus Ave 105 Inglewood, CA 89030 L1, L2 5021 Dumont Pl Woodland Hills, CA 91364 M1, M2 4819 Quedo Pl Westlake Village, CA 91362 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 I1, I2 5332 Felice Pl Stevenson Ranch, CA 94135 N1, N2 20044 Wells Dr Beverly Hills, CA 90210 O1, O2 7659 Mckinley Ave Los Angeles, CA 90001
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 a maximum of 50 names.
The program should be modalized and well documented. You must:
1. Use a structure for names and address information
2. Allocate storage dynamically for each structure (dynamic memory allocation)
3. Use command line arguments
4. Use files; no input/output redirection
5.
Use an array of pointers to structures; Do NOT use an array of structures
6. Use multiple file format; header file, multiple .c files
7. Sort the zip codes in ascending order
8. Use the data file assigned
Name of input and output files are entered on the command line.
The program should read address information from the input file and output them to an output file.
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:
Second line:
Third line:
Fourth line:
Lastname, Firstname
Street address
City and State
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:
Lab8.exe lab8_input.txt lab8_output.txt
Turn In
Turn in source code (header file, multiple .c files), input file and output file.
Transcribed Image Text: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 a maximum of 50 names. The program should be modalized and well documented. You must: 1. Use a structure for names and address information 2. Allocate storage dynamically for each structure (dynamic memory allocation) 3. Use command line arguments 4. Use files; no input/output redirection 5. Use an array of pointers to structures; Do NOT use an array of structures 6. Use multiple file format; header file, multiple .c files 7. Sort the zip codes in ascending order 8. Use the data file assigned Name of input and output files are entered on the command line. The program should read address information from the input file and output them to an output file. 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: Second line: Third line: Fourth line: Lastname, Firstname Street address City and State 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: Lab8.exe lab8_input.txt lab8_output.txt Turn In Turn in source code (header file, multiple .c files), input file and output file.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr