1 2 3
typedef struct node* Nodeptr; struct node { int data; Nodeptrnext; };
Nodeptrmknode (int item)
{ Nodeptrnp; np = (Nodeptr) malloc (sizeof (struct node)); if (np != NULL) { np->data = item; np->next = NULL; } else exit (1); return np; }
1