Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Node *search(Node *head, int item)
- {
- Node *temp;
- temp = head;
- while(temp != NULL){
- if(temp->data == item)
- {
- printf("Yes this item is in the linked list\n");
- return temp;
- }
- temp = temp->next;
- }
- printf("This item is not in the linked list\n");
- return head;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement