Question 45Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 3 (5:00 PM)

Consider the given memory representation of the singly linked list where start points to the address of first node of the linked list, which is memory…

Consider the given memory representation of the singly linked list where start points to the address of first node of the linked list, which is memory location 0. Memory representation of the singly linked list Memory location | Item value | Pointer to next element 0 | A | 4 1 | E | 2 2 | B | NULL 3 | | 4 | C | 1 If a new node whose data value is X is inserted after the node whose data value is E in any free location available in the memory, then what will the memory representation be after inserting the new node?
  1. AMemory representation of the linked list after inserting node X Memory location | Item value | Pointer to next element 0 | A | 4 1 | E | 2 2 | B | NULL 3 | X | 1 4 | C | 3
  2. BMemory representation of the linked list after inserting node X Memory location | Item value | Pointer to next element 0 | A | 4 1 | E | 3 2 | B | NULL 3 | X | 2 4 | C | 1
  3. CMemory representation of the linked list after inserting node X Memory location | Item value | Pointer to next element 0 | A | 3 1 | E | 2 2 | B | NULL 3 | X | 4 4 | C | 1
  4. DMemory representation of the linked list after inserting node X Memory location | Item value | Pointer to next element 0 | A | 4 1 | E | 2 2 | B | 3 3 | X | NULL 4 | C | 1
Show answerHide answer

Correct answer: (B) Memory representation of the linked list after inserting node X Memory location | Item value | Pointer to next element 0 | A | 4 1 | E | 3 2 | B | NULL 3 | X | 2 4 | C | 1

Explanation

The list is A(0) → C(4) → E(1) → B(2). X goes into free location 3. E's pointer changes to 3, and X points to B at 2, giving A → C → E → X → B as in option B.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 3 (5:00 PM)

This is question 45 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 3 (5:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.