Advertisement
muntasir007

Untitled

Feb 10th, 2016
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. void insertLast (int num) {
  2.     temp = (node_t*) malloc (sizeof (node_t));
  3.     temp->val = num;
  4.     temp->PREV = last;
  5.     temp->NEXT = NULL;
  6.     if (last!=NULL )last->NEXT = temp;
  7.     else first = temp;
  8.     last = temp;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement