Multiple choice

Deleting entire list can be accomplished by performing which of the following steps?

  1. Assign the start pointer to a temporary variable

  2. Advance the start pointer to the next node

  3. Deallocate the memory occupied by the node pointed to by p t r.

  4. All of these

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Deleting an entire linked list requires multiple steps: storing the start pointer temporarily, advancing through each node, and deallocating memory as you go. This process ensures all nodes are freed without creating memory leaks, and all listed operations are part of this complete deletion procedure.