关于调用子函数的求助!拜托了!
程序代码:
#include <stdio.h>
#include <stdlib.h>
#define true 1
#define false 0
typedef struct node
{
int d;
struct node *next;
}node;
/*创建有五个实际节点的单链表*/
void Creat(node *h)
{
node *p,*t;
int i;
h=(node *)malloc(sizeof(node));
h->next=NULL;
p=h;
for(i=0;i<5;i++)
{
t=(node *)malloc(sizeof(node));
t->next=NULL;
printf("请输入一个要放入单链表的数字:");
scanf("%d",&t->d);
printf("\n") ;
p->next=t;
p=t;
}
printf("\nFirst output h->next %p\n",h->next); /*输出h->next的地址*/
}
int main()
{
node *h;
Creat(h);
printf("\nSecond output h->next %p\n",h->next); /*输出h->next的地址*/
return 0;
}
请问为什么这个程序在执行完子函数Creat就终止了?
为什么没有执行主函数中的printf函数?

