更多"有以下说明和定义语句:
struct student
{ "的相关试题:
[单项选择]有以下说明和定义语句:
struct student
{ int age; char num[8];};
struct student stu[3]={{20,"200401"},{21,"200402"},{10/9,"200403"}};
struct student *p=stu;
以下选项中引用结构体变量成员的表达式错误的是( )。
A. (p++)->num
B. p->num
C. (*p).num
D. stu[3].age
[单项选择]若有以下定义的语句
struct student
int age;
int num;;
struct student stu[3]=1001,20,1002,19,1003,21;
main( )
stmct student *p;
p=stu;
…
则以下不正确的引用是
A. (p++)->num
B. p++
C. (*p).num
D. P=&stu.age.
[单项选择]有以下说明和定义语句 struct student {int age;char num[8]; }; struct student stu[3]={{20,"200401"},{21,"200402"},{10/9,"200403"}}; struct student*p=stu;以下选项中引用结构体变量成员的表达式错误的是______。
A. (p++)->num
B. p->num
C. *num
D. stu[0].age
[单项选择]若有以下定义的语句 struct student {int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main( ) {stmct student *p; p=stu; …} 则以下不正确的引用是
A. (p++)->num
B. p++
C. (*.num
D. P=&stag
[单项选择]已知学生记录描述为 struct student { int no; char name[20]; char sex; struct { int year; int month; int day; } birth; }; struct student s;变量s中的“生日”应是“1985年4月4日”,下列对“生日”的正确赋值方式是______。
A. year=1985;month=4;day=4;
B. birtyear=1985;birtmonth=4;birtday=4;
C. year=1985;month=4;day=4;
D. birtyear=1985;birtmonth=4;birth,day=4;
[单项选择]已知学生记录描述为: struct student { int no; char name[20],sex; struct { int year,month,day; } birth; }; struct student s; 设变量s中的“生日”是“1984年11月12日”,对“birth”正确赋值的程序段是( )。
A. year=1984;month=11;day=12;
B. year=1984;month=11;day=12;
C. birtyear=1984;birtmonth=11;birtday=12;
D. birtyear=1984;birtmonth=11;birtday=12;
[单项选择]
设有如下定义
struct ss {
char name[10];
int age;
char sex;
}
std[3],* p=std;
下面各输入语句中错误的是()
A. scanf("%d",&(*.ag;
B. scanf("%s",&stnam;
C. scanf("%c",&std[0].se;
D. scanf("%c",&(p->se);
[单项选择]设有如下定义: struct ss { char name[10] int age; char sex; } std[3],*p=std; 下面各输入语句中错误的是( )。
A. scanf("%d",&(*.ag;
B. scanf("%st",&stnam;
C. scanf("%c",&std[0].se;
D. scanf("%c",&(p->se);
[单项选择]设有如下定义 struct ss { char name[10]; int age; char sex; }std[3], * p=std; 下面各输入语句中错误的是
A. cin>>(* .ag;
B. cin>>stnam;
C. cin>>std[0].se;
D. cin>>(p->.se);