已知有如下定义:struct a{char x; double y;}data,t;若有t=&data,则对data中的成员的正确引用是()
A. (t).data.x
B. (t).x
C. t->data.x
D. t.data.x
已知学生记录描述为:struct student{ int no;char name[20],sex;struct{ int year,month,day;} birth;}s;设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是()
A. year=1984;month=11;day=12;
B. s.year=1984;s.month=11;s.day=12;
C. birth.year=1984;birth.month=11;birth.day=12;
D. s.birth.year=1984;s.birth.month=11;s.birth.day=12;
若已定义: int a[]={0,1,2,3,4,5,6,7,8,9},p=a,i; 假设0≤i≤9,则对a数组元素不正确的引用是()
A. a[p-a]
B. (&a[i])
C. p[i]
D. a[10]
有以下定义:int i,sum=0;struct STU{ char num[10]; float score[3]; }s[3]={{“20021”,90,95,85}, {“20022”,95,80,75},{ “20023”,100,95,90},},*p=s;则执行以下程序段后,sum的值为()。for(i=0;i<3;i++) sum=sum+p->score[i];
A. 260
B. 270
C. 280
D. 285