Hw Chapter 4 Lists Insert an element and search Description: Using the List codes, write a program to implement the following operations: 1) Create a list that has the following elements: ; 2) Print...


C++


Hw Chapter 4 Lists Insert an element and search<br>Description:<br>Using the List codes, write a program to implement the following operations:<br>1) Create a list that has the following elements: <2; 23; 15; 5; 9 >;<br>2) Print the elements of the list;<br>3) Insert an element with value 20 before 5, and then print the eleme<br>nts of the list;<br>4) Print the position of the current element;<br>5) Print the value of the next element.<br>Output Example:<br><|2 23 15 5 9><br><2 23 15 | 20 5 9><br>Current pos is 3<br>next value is 5<br>

Extracted text: Hw Chapter 4 Lists Insert an element and search Description: Using the List codes, write a program to implement the following operations: 1) Create a list that has the following elements: <2; 23;="" 15;="" 5;="" 9="">; 2) Print the elements of the list; 3) Insert an element with value 20 before 5, and then print the eleme nts of the list; 4) Print the position of the current element; 5) Print the value of the next element. Output Example: <|2 23="" 15="" 5="" 9=""> <2 23="" 15="" |="" 20="" 5="" 9=""> Current pos is 3 next value is 5

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here