以下程序将结构体变量 stud1 的值赋给结构体变量 stud2 ,在空白处要填入的语句是( )。 void main() { struct student{ int num; char name[20]; int score; }stud1= {3147, "ZhangHong",92}; struct student stud2; struct student *p; p=&stud1; ( ) printf("%d %d ",stud2.num, stud2.score); }
A.
stud2.num=stud1->num; strcpy(stud2.name,stud1->name); stud2.score=stud1->score;
B.
stud2.num=p->num; strcpy(stud2.name,p->name); stud2.score=p->score;
C.
stud2->num=stud1.num; strcpy(stud2->name,stud1.name); stud2->score=stud1.score;
D.
stud2->num=p->num; strcpy(stud2->name,p->name); stud2->score=p->score;