12. 以下函数建立带头结点的单向链表,并返回头结点地址。编号为(48)的空应填入什么?
#include <stdlib.h>
struct node
{ char data; struct node *next; };
____(48)____ CreatList(char *s)
{
struct node *h, *p, *q;
h = malloc(sizeof(struct node));
p = q = h;
while (*s != '\0') {
p = malloc(sizeof(struct node));
p->data = *s;
q->next = p;
q = p;
s++;
}
p->next = NULL;
return h;
}