struct node //Definition of a node. double data; struct node *next; b; struct no
ID: 3748475 • Letter: S
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)); // 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);Explanation / Answer
2.7: WHILE loop:
while(iterator!= NULL){
print(iterator);
iterator = iterator->next;
}
2.8: heap structure:
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.