以下程序的功能是:建立一个带有头结点的单向,并将存储在数组中的字符依次转储到的各个结点中,请为下划线处有号码的选择出正确的选项。 #include
stuct node { char data; struct node *next;}; struct node * CreatList(char *s) { struct node *h,*p,*q; h=(struct node *) malloc(sizeof(struct node)); p=q=h; while(*s!='\0') { p=(struct node *) malloc(sizeof(struct node)); p->data= * s ; q->next=p; q= ( ) ; s++; } p->next='\0'; return h; } main() { char str[]="link list"; struct node *head; head=CreatList(str); ... }