Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct node Node;
- struct node{
- int data;
- Node *next;
- };
- Node *prepend(Node *head)
- {
- Node *new_node = (Node *)malloc(sizeof(Node));
- printf("\nEnter Node item for beganing : ");
- scanf("%d", &new_node->data);
- new_node->next = head;
- head = new_node;
- return head;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement