Question: struct node //Definition of a node. double data; struct node *next; b; struct node* makeNode (double d) struct node *nodePtr; nodePtr-(struct node*) malloc (sizeof(struct node));




struct node //Definition of a node. double data; struct node *next; b; struct node* makeNode (double d) struct node *nodePtr; nodePtr-(struct node*) malloc (sizeof(struct node)); // Observe the size. nodePtr->data = d; nodePtr->next = NULL; return nodePtr; void print (struct node *nodePtr) printf ("Data-xfNn", nodePtr->data); int main O struct node *first; struct node *iterator; first - makeNode (0.1); print (first); first->next = makeNode (0.2); first->next->next = makeNode (0.3); first->next->next->next - makeNode (0.4)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
