I have accepted input into variable head->array[a]. I now have to search the linked list to see if the input in array[a] is already stored. I have been trying to convert a linked list search from C++ but have not been successful can anyone please help me?
This is what I have:
head->array[a]==target;
previous=NULL;
current=head;
while (current !=NULL && (*current) !=target)
{
previous=current;
current=*current->next;
}
if ((current !=NULL) && ((*current) == target))
printf("your data has already been entered");