C language ONLY! Please read the prompt carefully and do
NOT use any of the previously posted solutions. They are
ALL incorrect! Read the prompt and satisfy ALL five of
the requirements. Thank you!
Use the following data file:
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: 1. Use a structure for names and address information 2. Allocate storage dynamically for each structure (dynamic memory allocation) 3. Use an array of pointers to structures; Do NOT use an array of structures 4. Use multiple file format; header file, multiple .c files 5. Sort the zip codes in ascending order 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.
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 11, 12 5332 Felice PL Stevenson Ranch, CA 94135
C language ONLY! Please read the prompt carefully and do NOT use any of the previously posted solutions. They are ALL in
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
C language ONLY! Please read the prompt carefully and do NOT use any of the previously posted solutions. They are ALL in
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!