Question: In a C program. 1. Ask the user to enter in the number of nodes for the linked list 2. Generate a list with the

In a C program.

1. Ask the user to enter in the number of nodes for the linked list 2. Generate a list with the # of nodes specified by the user Each node will contain a random number with the range 0-9999 3. Print out the generated list (10 per line)

Required Functions: node *makeNode(int val); - create a node for your list, should return a pointer to that node (struct node *) node *insertFront(node *head, node *new); - add a node to the front of the list, return new front of list void printList(node *head); - print out the linked list (10 per line)

Example: ---------------------------------------------------------------------- $ ./a.out How many nodes? 20 8430 2799 4782 9705 7778 7618 473 878 8270 7042 4739 8414 188 1474 7954 7162 9796 3059 5374 212

$ ./a.out How many nodes? 15 9564 6561 7377 2904 4080 255 5940 4604 6782 4102 29 1955 5023 5536 8641

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!