Question: A fellow student is implementing a function to traverse a linked list and print out the value contained in each node. They googled it and
A fellow student is implementing a function to traverse a linked list and print out the value contained in each node. They googled it and copy/pasted the following algorithm, only changing the variable names to match the variables used in the list's class. void printListData() { Node *tempptr; tempptr = head; while(tempPtr != NULL) { cout data next; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
