Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- typedef struct list
- {
- int value;
- struct list *next;
- }list;
- void push(list **head,int data)
- {
- list *tmp=(list*)malloc(sizeof(list));
- tmp->value=data;
- tmp->next=*head;
- *head=tmp;
- }
- int main(void)
- {
- list *head;
- head=NULL;
- push(head,9);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement