Question: PROGRAM IN LANGUAGEC Additional Linked List Functions Start with the file linkedList.c in the notes for chapter 12. Use the same style of linked list

 PROGRAM IN LANGUAGEC Additional Linked List Functions Start with the file

PROGRAM IN LANGUAGEC Additional Linked List Functions Start with the file linkedList.c in the notes for chapter 12. Use the same style of linked list as discussed there. Add the following three functions. A nice way to do this is to put your functions in a separate file, perhaps called myLLfunctions.c and then use the preprocessor to include that file into linkedList.c struct NODE struct NODE *link; int value; typedef struct NODE Node; #include "myLLfunctions.c" 1Write the function int countTarget (Node "start, int target) that counts the number of times the target value occurs in the linked list. The parameter start points to the first node of the linked list. If the target does not occur in the list, return 0. If the linked list is empty, return 0. 2. Write the function int findMin Node *start, int *min ) That finds the minimum value in the linked list and returns it in the parameter min. If the linked list is empty the function evaluates to 0 (returns a 0); otherwise it evaluates to 1 3. Write the function int deleteFirst (Node ptrToHeadPtr) that deletes the first node of a singly linked list. The return value is 1 if the operation succeeded, or 0 if not. The operation fails if free) fails. If the list is already empty, change nothing and return a 0 Note that the head pointer variable to the linked list in main) may be altered, so the parameter is a pointer to the head pointer variable. You will need to write a main ) that tests your functions The functions themselves should not write out anything. Your functions should not use any global variables since the grading program will not have those global variables PROGRAM IN LANGUAGEC Additional Linked List Functions Start with the file linkedList.c in the notes for chapter 12. Use the same style of linked list as discussed there. Add the following three functions. A nice way to do this is to put your functions in a separate file, perhaps called myLLfunctions.c and then use the preprocessor to include that file into linkedList.c struct NODE struct NODE *link; int value; typedef struct NODE Node; #include "myLLfunctions.c" 1Write the function int countTarget (Node "start, int target) that counts the number of times the target value occurs in the linked list. The parameter start points to the first node of the linked list. If the target does not occur in the list, return 0. If the linked list is empty, return 0. 2. Write the function int findMin Node *start, int *min ) That finds the minimum value in the linked list and returns it in the parameter min. If the linked list is empty the function evaluates to 0 (returns a 0); otherwise it evaluates to 1 3. Write the function int deleteFirst (Node ptrToHeadPtr) that deletes the first node of a singly linked list. The return value is 1 if the operation succeeded, or 0 if not. The operation fails if free) fails. If the list is already empty, change nothing and return a 0 Note that the head pointer variable to the linked list in main) may be altered, so the parameter is a pointer to the head pointer variable. You will need to write a main ) that tests your functions The functions themselves should not write out anything. Your functions should not use any global variables since the grading program will not have those global variables

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!