谁能帮我看看我怎么不能在链表里插入数据呀please

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
运行结果及报错内容
我的解答思路和尝试过的方法
我想要达到的结果


#include<stdio.h>
#include<stdlib.h>
typedef struct listnode{
    int date;
    struct listnode* next;

}list;
int main()
{
    struct listnode* p;
    int x;
    int a;
    int b;
    int count;
    list node1 = { 10,NULL };
    list node2 = { 20,NULL };
    list node3 = { 30,NULL };
    list node4 = { 40,NULL };
    node1.next = &node2;
    node2.next = &node3;
    node3.next = &node4;
    p = &node1;
    while (p != NULL)
    {
        printf("%d\n", p->date);
        p = p->next;

    }
    
        printf("请输入需要查找的数");
        scanf_s("%d", &x);
        p = &node1;
        while (p != NULL)
        {
            if (x == p->date)
            {
                printf("    找到啦      %d\n", p->date);
            }
            p = p->next;
        }
        printf("请增加一个数\n");
        scanf_s("%d", &a);
        printf("增加到第几个数后面\n");
        scanf_s("%d", &b);
        p = &node1;
        while (p != NULL && b <= 4)
        {
            count = 0;
            if (p != NULL&&count<=b)
            {
                count++;
                p = p->next;
            }
            list* h;
            h =  (list *) malloc(sizeof(list));
            h->date = a;
            h->next = p->next;
            p->next = h;
        }
        while (p != NULL)
        {
            printf("%d\n", p->date);
            p = p->next;

        }

    


}

改动处见注释,供参考:

#include<stdio.h>
#include<stdlib.h>
typedef struct listnode{
    int date;
    struct listnode* next;

}list;
int main()
{
    struct listnode* p;
    int x;
    int a;
    int b;
    int count;
    list node1 = { 10,NULL };
    list node2 = { 20,NULL };
    list node3 = { 30,NULL };
    list node4 = { 40,NULL };
    node1.next = &node2;
    node2.next = &node3;
    node3.next = &node4;
    p = &node1;
    while (p != NULL)
    {
        printf("%d\n", p->date);
        p = p->next;

    }
    printf("请输入需要查找的数");
    scanf("%d", &x);
    p = &node1;
    while (p != NULL)
    {
        if (x == p->date)
        {
            printf("    找到啦      %d\n", p->date);
            break;                    //修改
        }
        p = p->next;
    }
    if(p==NULL)                       //修改
        printf("未找到\n");           //修改
    printf("请增加一个数\n");
    scanf("%d", &a);
    do{                                 //修改
        printf("增加到第几个数后面\n");
        scanf("%d", &b);
    }while(b < 1 || b > 4);             //修改
    p = &node1;
    count = 1;           //修改
    while (p != NULL && count < b) //while (p != NULL && b <= 4)
    {
       //if (p != NULL&&count<=b)
       //{
           count++;
           p = p->next;
       //}
    }
    list* h;
    h =  (list *) malloc(sizeof(list));
    h->date = a;
    h->next = p->next;
    p->next = h;
    //}
    p = &node1;   //修改
    while (p != NULL)
    {
       printf("%d\n", p->date);
       p = p->next;
    }
    return 0;
}