student {
int num;
int age; }; struct
student stu,*p=&stu;
A: stu.age
B: (*p).age
C: student.age
D: p->age
举一反三
- 下列选项中不能够定义一个结构体类型变量stu的是 。 A: struct student { int num; int age; } stu; B: struct student { int num; int age; }; student stu; C: struct {int num; int age; } stu; D: struct student {int num; int age; }; struct student stu;
- 以下结构体的定义语句中,正确的是______。? struct student {int num; char name[10];int age;}stu;|struct {int num; char name[10];int age;}student; struct student stu;|struct student {int num; char name[10]; int age;}; student stu;|struct student {int num; char name[10];int age;};stu;
- 若有定义:struct student{ int age; int num;};struct student stu,*p;则以下正确的赋值语句是()。 A: p=stu; B: *p=*stu; C: *p=&stu; D: p=&stu;
- 以下对结构变量stu1中成员age的非法引用是( )struct student{ int age; int num;};struct student stu1, *p;p=&stu1; A: stu1.age B: student.age C: p->age D: (*p).age
- 以下对结构变量stu1中成员age的非法引用是( )struct student{ int age; int num;};struct student stu1, *p;p=&stu1; A: stu1.age B: student.age C: p->age D: (*p).age
内容
- 0
若有以下定义和语句:struct student{ int num ; int age ;} ;struct student stu[3] = {{1001,20} ,{1002,19},{1003,21}} ;main ( ){struct student*p ;p = stu ;. . .}则以下不正确的引用是( )。 A: (p+ + )->; age B: p + + C: (*p).age D: p = &stu. num
- 1
设有如下语句:struct student{int num;int age;};struct student stu[3]={{101,18},{102,21},{103,19}};struct student *p=stu;则下面表达式的值为102的是( ) A: (p++)->num B: (p++)->age C: (*p).age D: (*++p).num
- 2
若有下列语句,则以下引用方式不合法的是( )。 struct student { int num; int age; }; struct student stu[3]={{101,20}, {102,19}, {103,20}}, *p=stu;
- 3
struct student{ int age; char num[8];};struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}};struct student *p=stu;以下选项中引用错误的是___ __。 A: (p++)->;num B: p->;num C: (*p).num D: stu[3].age
- 4
22. 以下对结构体类型变量的定义错误的是( )。 A: B: define STU struct student STU {float height; int age; }std1; C: struct student {float height; int age; }std1; D: struct {float height; int age; }std1; E: struct {float height; int age; }student; struct student std1;