Question: This code is supposed to return the sum of the node data in a linked list. Correct the bug in the code. Add ptr =

This code is supposed to return the sum of the node data in a linked list. Correct the bug in the code. Add "ptr = ptr->next" to line 6 Change line 5 as ptr == NuLL* Change line 3 as "Node *ptr = NULL;" Add "ptr = ptr-snext" to line 8 Change line 11 as "retum *ptr
Step by Step Solution
There are 3 Steps involved in it
The task is to correct the code to get the sum of the node data in a linked list He... View full answer
Get step-by-step solutions from verified subject matter experts
