Advertisement
shohan11421

part (B) b no ar 1

Mar 2nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. void insert_last(int a)
  2. {
  3.     struct node *n;
  4.     n = (struct node *) malloc(sizeof(struct node));
  5.     n -> data = a;
  6.     n -> next = NULL;
  7.     temp = head;
  8.     while(temp -> next)
  9.     {
  10.         temp = temp -> next;
  11.     }
  12.     temp -> next = n;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement