Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

*NOTE* I already have an idea for the information below but it's needed for context. You get to create your own program! You may choose something that you are interested in or has something to do with...

1 answer below »

*NOTE* I already have an idea for the information below but it's needed for context.

You get to create your own program! You may choose something that you are interested in or has something to do with a hobby you enjoy. You will come up with your own program that must include a number of the topics as outlined below. You are not restricted to this list, but must utilize at leastSIX (6)items from the following list:

  • Strings Manipulation
  • 2D Arrays
  • File I/O (More than simply outputting)
  • Command Line Arguments
  • Pass by Pointer
  • Structures
  • Linked Lists (Pointers)
  • Header Files (Multiple C Files)
  • Sorting
  • Recursion
  • Stack/Queue

Requirements

Your program should not be a simple implementation of six of the topics listed above but should include depth and thought, and it should make sense as a semi-real world example.

You must also include proper documentation for your program. This should include (but isn't necessarily limited to) comments in the code where necessary, author name documented at the top of the program, and documentation on how to use the program, including what topics from the above list are included in the program.

My idea:To create a profile menu where you can create a profile and it will send it to a document/text file where it can be sorted.You can use whatever of the six topics just please tell me which six topics you use.
Answered Same Day Aug 07, 2021

Solution

Arun Shankar answered on Aug 08 2021
131 Votes
#include #include #include #include typedef struct custome
{

Field for the full name
char Full_Name[80];

Address
char street_address[56];
char city[36];
char state[3];
char zipcode[6];

Account Balance
float Account_Balance;

Pointer to the next node
struct customer* next;
}customer;
Head of the linked list
customer* head = NULL;
* A helper function to replace
the - character with a space *
void replace(char a
[], char c, char d)
{
for(int i=0;a
[i]!='\0';i++)
if(a
[i]==c)
a
[i] = d;
}
* A helper function to compare two strings
ignoring the cases *
int strcmpi(char* a, char* b)
{
if(strlen(a)!=strlen(b))
return 1;

int i;
for(i=0;a[i]!='\0';++i)
if(toupper(a[i])!=toupper(b[i]))
return 1;
return 0;
}
* A function to print the linked list
in the ascending order of Full_Name *
void print_list()
{
customer* temp = head;
while(temp!=NULL)
{
printf("%s\n%s\n%s, %2s %5s\n%9.2f\n-----\n", temp->Full_Name, temp->street_address, temp->state, temp->city, temp->zipcode, temp->Account_Balance);
temp = temp ->next;
}
}
* A function to print the linked list
in the descending order of Full_Name *
void print_list_reverse(customer* temp)
{
if(temp==NULL)
return;
print_list_reverse(temp->next);
printf("%s\n%s\n%s, %2s %5s\n%9.2f\n-----\n", temp->Full_Name, temp->street_address, temp->state, temp->city, temp->zipcode, temp->Account_Balance);
}
* A function to return a pointer
to a node with the specified name *
customer* get_node(char* cname)
{
if(head==NULL)
return NULL;

customer* temp = head;
while(temp!=NULL)
{
if(strcmp(temp->Full_Name,cname)==0)
return temp;
temp = temp->next;
}
return NULL;
}
* A function to delete the record
of a customer whose name is the parameter.
Returns 0 if customer not found. 1 if found
and deleted. *
int delete(char* cname)
{
if(head==NULL)
return 0;
customer* temp = head;
if(strcmp(head->Full_Name,cname)==0)
head node is to be deleted
{
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here