i cant see how it puts a new head
if p is our head of the listCode:typedef struct node { int value; struct node *next; }Node; void what1(Node ** p,int num){ Node *elt; elt=(Node*)malloc(sizeof(Node)); elt->next=*p; elt->value=num; *p=elt; }
then we can just do this
i cant understand the first codeCode:void what1(Node ** p,int num){ Node *elt; elt=(Node*)malloc(sizeof(Node)); elt->next=p; elt->value=num; }