举一反三
- 设有变量定义 struct stu { int age; int num; }std,*p=&std; 能正确引用结构体变量std中成员age的表达式是_____
- 当p指向结构体变量stu时,以下哪种方法无法引用成员num( )。 A: stu.num B: (*p).num C: p->;nun D: p.num
- 有以下说明和定义语句,以下选项中引用结构体变量成员的表达式错误的是() A: (p++)->num B: p->num C: (*p).num D: stu[3].age
- 结构体变量成员的引用方式是
- 1、设有变量定义 struct stu{int age; int num;}std,*p=&std;能正确引用结构体变量std中成员age的表达式是A) std->age B) *std->ageC) *p.age D) (*p).age
内容
- 0
有以下说明和定义语句 , 以下选项中引用结构体变量成员的表达式错误的是( ) struct student { int age; char num[8];}; struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; struct student *p=stu;
- 1
有以下的结构体变量定义语句:structstudent{intnum;charname[9];}stu;则下列叙述中错误的是()。 A: 结构体类型名为stu B: num是结构体成员名 C: struct是C的关键字 D: 结构体类型名为student
- 2
下列选项中不能够定义一个结构体类型变量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;
- 3
有下列结构体,对该结构体变量stu的成员项引用不正确的是( )。 structstudent { int m; Float n; } stu ,*p=&stu; A: stu.n B: p->m C: (*p).m D: p.stu.n
- 4
有以下说明和定义语句 structstudent {int age; char num[8];}; structstudentstu[3]={{20,"200401"},{21,"200402"},{19,"200403"}}; structstudent *p=stu; 以下选项中引用结构体变量成员的表达式错误的是______。