Facebook
From Ryuujin, 9 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 546
  1. typedef struct El
  2. {
  3.         struct El *N;
  4.     int Z;
  5. } EL;
  6.  
  7. EL *Dodaj(EL *Lista, int Z)
  8. {
  9.         EL * Nowy = (EL*)malloc(sizeof(EL));
  10.         Nowy->N = 0;
  11.         Nowy->Z = 0;
  12.  
  13.         if(!Lista)
  14.         return Nowy;
  15.    
  16.     EL *Buf = Lista;
  17.     while(Buf->N)
  18.         Buf = Buf->N;
  19.     Buf->N = Nowy;
  20.    
  21.     return Lista;
  22. }