Question
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
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. use I/O redirection for the input and output files. This program must be done with an array of pointers to structures. ""do not use an arrray of structures"". this program MUST use multiple file format (.c and 2 .h files) You may use string handling functions for this lab.
Sort in ascending order.
input: create a data file of names and addresses in alphabetic order(by name) as follows:
first line: last name, first name
second line: street address
third line: city and state
fourth line: zip 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 input file. YOU MUST USE POINTERS TO STRUCTURES AND MALLOC. NO GLOBAL VARIABLES.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started