Multiple choice

Inserting at the end of the list is done by performing which of the following steps?

  1. Assign NULL value to the next pointer field of the new node.

  2. Assign address of the new node to start.

  3. Both (1) & (2)

  4. None of these

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

Inserting at the end of a linked list involves two key steps: setting the new node's next pointer to NULL (since it will be the last element), and updating the previous last node's next pointer to point to the new node. Both operations are necessary to properly maintain list integrity.