Guest User

Untitled

a guest
Jun 18th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. struct Node {
  2. int Data;
  3. Node* next;
  4. };
  5.  
  6. for (int i = 0; i < 5; i++)
  7. a = add(a, i);
  8.  
  9. Node* add(Node *head, int Value)
  10. {
  11. Node *New = (Node*)malloc(sizeof(Node));
  12. New->Data = Value;
  13. New->next = head;
  14. return New;
  15. }
  16.  
  17. Node* Find(Node *head, int Value)
  18. {
  19. while (head)
  20. {
  21. if (head->Data == Value)
  22. return head;
  23. head = head->next;
  24. }
  25. return NULL;
  26. }
  27.  
  28. Node* add1(Node* head,Node* del)
  29. {
  30. Node *New = (Node*)malloc(sizeof(Node));
  31. New->Data = 777;
  32. del->next = New;
  33. New->next = del->next->next;
  34. return head;
  35. }
Add Comment
Please, Sign In to add comment