Suppose currentNode refers to a node in a linked list (using the Node class with member variables called data and nextNode). What statement changes currentNode so that it refers to the next node?

(A) currentNode ++;
(B) currentNode = nextNode;
(C) currentNode += nextNode;
(D) currentNode = currentNode->nextNode;

Related Posts 👇

  • Which of the following statement is correct?

    (A) A Threaded Binary Tree is a binary tree in which every node that does not have a left child has a THREAD (in actual sense, a link) to its INORDER successor
    (B) A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its PREOREDR successor
    (C) A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its INORDER successor
    (D) A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its POSTORDER successor

Leave a Reply

Your email address will not be published. Required fields are marked *