Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- typedef struct NODE
- {
- int data;
- struct NODE *next;
- } node;
- node *head;
- int main()
- {
- head=(node *)malloc(sizeof(node));
- head->data=3;
- head->next=(node *)malloc(sizeof(node));
- head->next->data=6;
- head->next->next=(node *)malloc(sizeof(node));
- head->next->next->data=2;
- head->next->next->next=(node *)malloc(sizeof(node));
- head->next->next->next->data=7;
- head->next->next->next->next=NULL;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment