新手关于链表问题求助

#include<stdio.h>
#include<stdlib.h>


typedef struct node
{
    int num;
    struct node *next;
}LN;


LN *Creat();
LN Divide(LN *h);
void Printf(LN *s);


void main()
{
    LN *h;
    h=Creat();
    Divide(h);
    printf("The even term is:  ");
    Printf(h);
    printf("The odd term is:  ");
    Printf(q);
}


LN *Creat()
{
    LN *p;
    LN *b;
    LN *h;
    int a;
    h=(LN *)malloc(sizeof(LN));
    h->next=NULL;
    b=h;
    printf("Input the sum of the numbers:  ");
    scanf("%d",&a);
    for(int i=0;i<a;i++)
    {
        printf("Input the %d number: ",i+1);
        p=(LN *)malloc(sizeof(LN));
        scanf("%d",&p->num);
        b->next=p;
        b=p;
    }
    p->next=NULL;
    system("CLS");
    return h;
}


LN Divide(LN *h)
{
    LN *q;
    LN *b;
    q=(LN *)malloc(sizeof(LN));
    b=q;
    while(h!=NULL&&h->next!=NULL)
    {
        b=h->next;
        h->next=b->next;
        h=h->next;
    }
    return *q;
}

void Printf(LN *s)
{
    LN *p;
    p=s->next;
    while(p)
    {
        printf("%d  ",p->num);
        p=p->next;
    }
}

**在Divide这个函数里面我有两个链表,如代码所示,我已经返回头指针q,可是为什么程序还是运行不了?简而言之就是我的q怎么传出来,我明明已经传出来了,在主函数里面又要由什么接应他。
**

Divide函数应该返回一个指针,然后在main函数里接收该指针地址,而且Divide函数里本身也有点问题,我已经改了,楼主可以看一下

#include<stdio.h>
#include<stdlib.h>


typedef struct node
{
    int num;
    struct node *next;
}LN;


LN *Creat();
LN *Divide(LN *h);
void Printf(LN *s);


void main()
{
    LN *h;
    h=Creat();
    LN *q = Divide(h);
    printf("The even term is:  ");
    Printf(h);
    printf("The odd term is:  ");
    Printf(q);
}


LN *Creat()
{
    LN *p;
    LN *b;
    LN *h;
    int a;
    h=(LN *)malloc(sizeof(LN));
    h->next=NULL;
    b=h;
    printf("Input the sum of the numbers:  ");
    scanf("%d",&a);
    for(int i=0;i<a;i++)
    {
        printf("Input the %d number: ",i+1);
        p=(LN *)malloc(sizeof(LN));
        scanf("%d",&p->num);
        b->next=p;
        b=p;
    }
    p->next=NULL;
    system("CLS");
    return h;
}


LN *Divide(LN *h)
{
    LN *q;
    LN *b;
    q=(LN *)malloc(sizeof(LN));


    b=q;
    while(h!=NULL&&h->next!=NULL)
    {
        b->next=h->next;
        b=b->next;
        h->next=b->next;
        h=h->next;

    }
    return q;
}

void Printf(LN *s)
{
    LN *p;
    p=s->next;
    while(p)
    {
        printf("%d  ",p->num);
        p=p->next;
    }
}

图片说明

创建俩表时,将头指针作为返回值传出来,然后在作为参数传递给Dvide()函数

图片说明