单选题:已知一结构体类型及变量定义如下:
已知一结构体类型及变量定义如下:
```c++
struct node{
int data;
struct node *next;
} *h,*p;
```
现已有头指针h指向的单链表如下图所示,要实现p指向的结点插入在链表头部的语句是:@[D](2)
说明:图中虚线箭头表示插入后改变的指针。

A. p=h; h->next=p;
B. p=h; h=p;
C. p->next=h; h->next=p;
D. p->next=h; h=p;
A.p=h; h->next=p;
B.p=h; h=p;
C.p->next=h; h->next=p;
D.p->next=h; h=p;
答案:D
```c++
struct node{
int data;
struct node *next;
} *h,*p;
```
现已有头指针h指向的单链表如下图所示,要实现p指向的结点插入在链表头部的语句是:@[D](2)
说明:图中虚线箭头表示插入后改变的指针。

A. p=h; h->next=p;
B. p=h; h=p;
C. p->next=h; h->next=p;
D. p->next=h; h=p;
A.p=h; h->next=p;
B.p=h; h=p;
C.p->next=h; h->next=p;
D.p->next=h; h=p;
答案:D