单项选择题
已知不带头结点的单链表L,下面用函数实现的在第一个元素前面插入值为x的元素结点的算法错误的是( )
A.void insert(List *L,elemtype x){ ptr p=*L; node d=new node(x); ptr q=&d; p->next=q; L=&q;}
B.List insert(List *L,elemtype x){ node d=new node(x); d.next=*L; return &d;}
C.List * insert(List *L,elemtype x){ node d=new node(x); d.next=*L; *L=&d; return L;}
D.void insert(List *L,elemtype x){ node d=new node(x); d.next=*L; *L=&d;}