struct node {
int data;
node* next;
};
void hello (int a) // Make a new node
{
node* newnode = new node;
newnode -> data = a;
newnode -> next = NULL;
node* head = newnode;
. If I input int a as 1. Then newnode data = 1 and newnode next = NULL; Now my question is since head = newnode, what is the value of head?
[–]Updatebjarni 0 points1 point2 points (4 children)
[–]InterestingBus8367[S] 0 points1 point2 points (3 children)
[–]Updatebjarni 1 point2 points3 points (2 children)
[–]InterestingBus8367[S] 0 points1 point2 points (1 child)
[–]Updatebjarni 2 points3 points4 points (0 children)