Home / CSE MCQs / Data Structure MCQs :: Discussion

Discussion :: Data Structure MCQs

  1. Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked list?
  2. A.
    Possible if X is not last node
    B.
    Possible if size of linked list is even
    C.
    Possible if size of linked list is odd
    D.
    Possible if X is not first node

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Following are simple steps. struct node *temp = X->next; X->data = temp->data; X->next = temp->next; free(temp);


Be The First To Comment