Question: Write a C++ program which allows users to create a list of integers and then provides them with choice to call following user-defined functions: a.
Write a C++ program which allows users to create a list of integers and then provides them with choice to call following user-defined functions: a. A function which accepts a pointer to the first node of the list and returns the maximum value in the list. b. A function that counts and returns the total number of nodes in the list. d. A function that prints only the even-numbered nodes of the list. e. A function that splits the given list in half and swaps the two halves in the following manner.
|
Initial After head head ia
Step by Step Solution
3.32 Rating (161 Votes )
There are 3 Steps involved in it
Solution Code MAINCPP include include include linkedListh include Nodeh using namespace std int main linkedList l Node p NULL int num a max while 1 co... View full answer
Get step-by-step solutions from verified subject matter experts
