Question: C programming Language only! Create a Code Blocks project named LinkedLists with the C PROGRAMMING LANGUAGE. This program will use a set of data structures
C programming Language only!
Create a Code Blocks project named LinkedLists with the C PROGRAMMING LANGUAGE. This program will use a set of data structures into which the user will enter contact information. Globally declare a ContactInfo struct. Create a function that asks for contact information and places the information into a struct. ContactInfo *getContactInfo( void ); Call getContactInfo ten times from a for loop, and each time add the new data structure to the end of the list (use a function named addContactInfoToList( ContactInfo *info ) to add the new data structure to the list).. Write a function that displays all of the data in the list.
Given:
#include
struct contactInfo{
char fn[50], ln[50]; char address[50], city[50], state[50]; char zip[50], phone[50]; struct contactInfo *next_permutation; };
void getContactInfo(struct contactInfo *ci){ printf("What is your first name?"); scanf("%s", ci->fn); printf("What is your last name?"); scanf("%s", ci->ln); printf("What is your address?"); scanf("%s", ci->address); printf("What is your city?"); scanf("%s", ci->city); printf("What is your state?"); scanf("%s", ci->state); printf("What is your zipcode?"); scanf("%s", ci->zip); printf("What is your phone number?"); scanf("%s", ci->phone); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
