Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. void add(list *pl, unsigned pos, int element)
  2. {
  3.         if(pl == NULL) return;
  4.         list l = *pl;
  5.         list temp;
  6.         unsigned i = 1;
  7.         temp=(list)malloc(sizeof(list));
  8.         temp->content = element;
  9.         temp->succ=NULL;
  10.         if(l==NULL || pos=0)
  11.         {
  12.             *pl=temp;
  13.             temp->succ=l;
  14.             l=temp;
  15.             return;
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement