So I have a linkedlist and I am trying to delete the name of the input, but the delete function cannot find the name on the list. I am trying to find the logic flaw, I need some help!
some knowledge to know: name is a character array in the struct
 case 4:
                     if(head == NULL)
                        printf("List is Empty\n");
                    else
                    {
                        printf("Enter the name to delete : ");
                        scanf("%s",&user);
                        if(delete(user))
                            printf("%s deleted successfully\n",user);
                        else
                            printf("%s not found in the list\n",user);
                    }
                    break;
int delete(const char* input)
{
    struct person *temp, *prev;
    temp = head;
    while(temp != NULL)
    {
         if(temp->name == input)
        {
            if(temp == head)
            {
                head = temp->next;
                free(temp);
                return 1;
            }
            else
            {
                prev->next = temp->next;
                free(temp);
                return 1;
            }
        }
        else
        {
            prev = temp;
            temp = temp->next;
        }
    }
    return 0;
}
 
     
    