Question
C program to create a doubly linked list. Make sure one of the entered elements is 24. Insert a new element after the existing linked
C program to create a doubly linked list. Make sure one of the entered elements is 24.
Insert a new element after the existing linked list element 24.
If there are more than one occurrence of 24, give user the choice where the new element must be inserted.
Below is the sample, program should be created for various input.
__Sample1_________________________________________
Input
24 19 32 45 24 39 -999
-56
Output
2 occurrence of 24 found. Where should the insertion occur?
Input
1
Output
24 -56 19 32 45 24 39
_Sample 2__________________________________________
Input
42 19 32 45 46 39 -999
-27
Output
No occurrence of 24 found.
____Sample 3________________________________
Input
24 19 32 45 24 39 46 24 54 -999
35
Output 3 occurrence of 24 found. Where should the insertion occur?
Input
3
Output
24 19 32 45 24 39 46 24 35 54
_____________________________________________
____Sample 4________________________________
--- Input ---
24 24 24 24 24 -999 0 Output 5 occurrence of 24 found. Where should the insertion occur? Input 5 Output 24 24 24 24 24 0
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