Objective: To gain experience in the use of pointers, structures, and dynamic memory allocation. Problem definition: You are to code and execute a C program to input names and addresses that are in alphabetic order and output the names and addresses to a new file in zip code order. Maximum of 50 names. The program should be modularized and well documented. You must use a structure for the names and address information. Allocate storage dynamically for each structure. I This program must be done with an array of pointers to structures. Do not use an array ol strucures. This program MUST use multiple file format. You may use string handling functions for this lab. Input: Create a data file of names and addresses in alphabetic order (by name) as follows: last name, first name street address first line: second line: third line: city and state zip fourth line: Assume no errors (which means that you have to type carefully.) Output: The program is to create a new file of names and addresses in zip code order with the above format. If duplicate records (2 or more) occur in the input file, only include one copy in the output file. YOU MUST USE POINTERS TO STRUCTURES AND MALLOC. NO GLOBAL VARIABLES. Hand in: A copy of the input file, the output file, a listing of the program, and a disk containing your executable file.
Objective: To gain experience in the use of pointers, structures, and dynamic memory allocation. Problem definition: You are to code and execute a C program to input names and addresses that are in alphabetic order and output the names and addresses to a new file in zip code order. Maximum of 50 names. The program should be modularized and well documented. You must use a structure for the names and address information. Allocate storage dynamically for each structure. I This program must be done with an array of pointers to structures. Do not use an array ol strucures. This program MUST use multiple file format. You may use string handling functions for this lab. Input: Create a data file of names and addresses in alphabetic order (by name) as follows: last name, first name street address first line: second line: third line: city and state zip fourth line: Assume no errors (which means that you have to type carefully.) Output: The program is to create a new file of names and addresses in zip code order with the above format. If duplicate records (2 or more) occur in the input file, only include one copy in the output file. YOU MUST USE POINTERS TO STRUCTURES AND MALLOC. NO GLOBAL VARIABLES. Hand in: A copy of the input file, the output file, a listing of the program, and a disk containing your executable file.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Help with c program using FILE HANDLING (fopen, fputs, fgets, etc.)
You can also test the program with the following input.txt file
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
Please also adhere to the following rules
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 6 images
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Can you please do the code in a multiple files one header file , and two c files . Must run the program on a command line. Thank you
Solution
by Bartleby Expert
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education