Ald IL node 2 ALQ at 2.1.1.2.1.1.1.2.1.3.1.4.1.5.1.6.1.7.1.8. 1.9.1. 10. 11. 12. 13 . 14. 15. 17. 18. #include
Posted: Fri May 20, 2022 11:29 am
Ald IL node 2 ALQ at 2.1.1.2.1.1.1.2.1.3.1.4.1.5.1.6.1.7.1.8. 1.9.1. 10. 11. 12. 13 . 14. 15. 17. 18. #include<stdio.h> #include<stdlib.h> struct node { char info; struct node *link; nodel }; typedef struct node *NODEPTR; Nint main() { NODEPTR nodei, node2, save, head, p, q; node1 = (NODEPTR) malloc(sizeof(struct node)); node2 = (NODEPTR)malloc(sizeof(struct node)); nodel->info= x; node2->info= Y; if (nodel->info> node2->info) Output of the Program { node1->link = node2; node2->link = NULL; head = nodel; } else {node1->link = NULL; node2->link = nodel; head = node2; } node2 = (NODEPTR)malloc(sizeof(struct node)); node2->info=Z; node2->link = head; ead = node2; for (save = head; save != NULL; save = save->link) printf("%c\n", save->info); }