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

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!