Multiple Choice
Given the following function declaration
Void insert NodePtr afterMe, int num) ;
//PRE: afterMe points to some node in the non-empty list
//POST: A new node containing num is inserted after afterMe.
Void insertNodePtr afterMe, int num)
{
// which of the following function definitions correctly implement this //function?
}
A) afterMe->link = new Node; afterMe->link->data = num;
AfterMe -> link ->link=afterMe->link;
B) NodePtr tmp=new Node; tmp-> data = num;
AfterMe -> link = tmp;
Tmp->link = afterMe -> link;
C) NodePtr tmp=new Node; tmp-> data = num;
Tmp->link = afterMe -> link;
AfterMe -> link = tmp;
D) NodePtr tmp=new Node; tmp-> data = num;
AfterMe -> link = tmp;
Tmp->link = NULL;
Correct Answer:

Verified
Correct Answer:
Verified
Q41: Given the following declarations, which statement would
Q42: As defined in the text, the pointer
Q43: The pointer in a node points to<br>A)
Q44: Which operator * or .) has higher
Q45: If you push the following numbers onto
Q47: The actual value of NULL is<br>A) -1<br>B)
Q48: Given the following stack declaration, which of
Q49: Removing data from a stack is called
Q50: If you write a linked list class,
Q51: If NodeTypePtr is defined to be a