Answered step by step
Verified Expert Solution
Question
1 Approved Answer
programing in c language 5. Write functions which perform according to the following descriptions. The input to each function is a doubly circular linked list
programing in c language
5. Write functions which perform according to the following descriptions. The input to each function is a doubly circular linked list of characters. a) delete - Deletes a the input character in the linked list e.g.) delete(lst, b) where Ist is an pointer to a linked list and b is a character. b) insert - Inserts a character to the linked list. e.g.) insert(lst, b) c) printfb pirnts the content of the linked list both forward and backward. e.g.) printfb(lst) Test the functions as shown below. 1) Construct the linked list from a set of characters kIrsrtskurnj that is stored in an array 2) Then randomly select one character from the set and delete this character(s) from the linked list.Use 3) Print the content of the linked list 4) Repeat 2) and 3) two more times rand() function (execute srand(time(NULL)) first) 5. Write functions which perform according to the following descriptions. The input to each function is a doubly circular linked list of characters.
a) delete
- Deletes all the input character in the linked list.
e.g.) delete(lst, b) where lst is an pointer to a linked list and b is a character.
b) insert
- Inserts a character to the linked list.
e.g.) insert(lst, b)
c) printfb
- pirnts the content of the linked list both forward and backward.
e.g.) printfb(lst)
Test the functions as shown below.
1) Construct the linked list from a set of characters {j k l r s r t s k u r n j} that is stored in an array.
2) Then randomly select one character from the set and delete this character(s) from the linked list. ?Use rand() function (execute srand(time(NULL)) first).
3) Print the content of the linked list.
4) Repeat 2) and 3) two more times.
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