Question: Given the following declarations, which statement would allocate memory for the first item in the list? struct Node { int item; Node* link; }; typedef
Given the following declarations, which statement would allocate memory for the first item in the list?
struct Node
{
int item;
Node* link;
};
typedef Node* NodePtr;
NodePtr head;
a) head = new int;
b) head = new Node;
c) head -> link=NULL;
d) head = new NodePtr
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
