Question: I am using Netbeans and C++ (Creating a Linked List, then Reversing Its Elements) Write a program that creates a linked list of 10 characters,
(Creating a Linked List, then Reversing Its Elements) Write a program that creates a linked list of 10 characters, then creates a copy of the list in reverse order. here below are the structure definition and function prototypes Please define these functions and test them in your main function. struct ListNode char data; // node data struct ListNode *nextPtr; // pointer to next node 3; // end struct ListNode typedef struct ListNode ListNode; typedef ListNode *ListNodePtr // function prototypes ListNodePtr reverseList( ListNodePtr currentPtr); void insert( ListNodePtr *sPtr, char value); void printList( ListNodePtr currentPtr); void push( ListNodePtr *topPtr, char info); insert a node Sample output: The list is: A BCDEFGHI The list in reverse is JIHGFEDC BA*
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
