[ create a new paste ] login | about

Link: http://codepad.org/UDC0PS5l    [ raw code | output | fork ]

C, pasted on Nov 13:
#include <stdio.h>
#include <stdlib.h>

struct cell {
  struct cell *next;
  int data;
};
struct slist {
  struct cell *head;
};



void saigo_sonyu(struct slist *start,int data)
{
  struct cell *p;
  p=start->head;
  while(p!=NULL){
    p=p->next;
  }

  p=(struct cell*)malloc(sizeof(struct cell));
  p->data=data;
  p->next=NULL;

}


Output:
1
2
In function `_start':
undefined reference to `main'


Create a new paste based on this one


Comments: