Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Node {
- int Data;
- Node* next;
- };
- for (int i = 0; i < 5; i++)
- a = add(a, i);
- Node* add(Node *head, int Value)
- {
- Node *New = (Node*)malloc(sizeof(Node));
- New->Data = Value;
- New->next = head;
- return New;
- }
- Node* Find(Node *head, int Value)
- {
- while (head)
- {
- if (head->Data == Value)
- return head;
- head = head->next;
- }
- return NULL;
- }
- Node* add1(Node* head,Node* del)
- {
- Node *New = (Node*)malloc(sizeof(Node));
- New->Data = 777;
- del->next = New;
- New->next = del->next->next;
- return head;
- }
Add Comment
Please, Sign In to add comment