230.若有下面定义,对结构体变量成员不正确引用的语句是( ).struct pup {char name[20]; int age; int230.\x05 若有下面定义,对结构体变量成员不正确引用的语句是( ).struct pup{char name[20];int age;int sex;}

来源:学生作业学帮网 编辑:学帮网 时间:2024/04/29 22:13:46

230.若有下面定义,对结构体变量成员不正确引用的语句是( ).struct pup {char name[20]; int age; int
230.\x05 若有下面定义,对结构体变量成员不正确引用的语句是( ).
struct pup
{char name[20];
int age;
int sex;
}p[3],*q;
q=p;
A.\x05 scanf("%s",p[0].name);
B.\x05 scanf("%d",q->age);
C.\x05 scanf("%d",&(q->sex));
D.\x05 scanf("%d",&p[0].age);

选B
读的时候需要的是变量的地址 CD都是 A是字符串名 就是字符串的首地址