若有以下程序段,则使用错误的选项是( ).struct student{int num;int age;};struct student stu[3]={{1001,20},{1002,19},{1004,20}};main();{struct student *p;p=stu;…}
A: p=stu.age
B: (p++)-num
C: (*p).num
D: p++
A: p=stu.age
B: (p++)-num
C: (*p).num
D: p++
举一反三
- 若有以下程序段,则使用错误的选项是(). struct student { int num; int age; }; struct student stu[3]={{1001,20},{1002,19},{1004,20}}; main(); { struct student *p; p=stu; … ; }
- struct Student{int num;int age;};int main(){struct Student stu[3] = {{1101, 18}, {2892, 19}, {3000, 20}};struct Student *p = stu;...} 若有定义和语句,则不正确的引用是( ) A: (p++)->num B: p=&stu.age C: p++ D: (*p).num
- 若有以下定义和语句: struct student {int num ;int age;}; struct student stu[3]={{l001,20},{1002,19},{1003,2l}}; main() {struct student *p;p=stu; ... } 则下列引用中不正确的是(A)。 A: (p++)→num B: p++ C: (*p).num D: p=&stu.age
- 若有以下定义和语句:struct student { int age,num ; }; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; int main() { struct student *p=stu; … }则以下正确的引用是()。 A: (p++)->num B: ++p->num C: (*p).num D: p->num
- 若有以下定义语句:struct student{ int num,age;};struct student stu[3]={{101,20},{102,19},{103,18}},*p=stu;则以下错误的引用是( ) A: (p++)->num B: p++ C: (*p).num D: p=&stu.age