根据下列定义,能打印出字母P的语句是( )。struct stu{char name[10];int age;};struct stu s[10]={"John",11,"Pau1",12,"Mary",11,"adam",12};A.primf("%c",s[3].name};B.primf("%c",s[3].name[1]);C.printf("%c",s[2].name[1]);D.printf("%c",s[1].name[0]);
根据下列定义,能打印出字母P的语句是( )。
struct stu{char name[10];
int age;
};
struct stu s[10]={"John",11,
"Pau1",12,
"Mary",11,
"adam",12
};
A.primf("%c",s[3].name};
B.primf("%c",s[3].name[1]);
C.printf("%c",s[2].name[1]);
D.printf("%c",s[1].name[0]);
相关考题:
根据下列的定义,能打印出字母P的语句是( )struct stu {char name[10];int age;};stmct stu s[10]={"John",11,"Paul",12,"Mary",11,"adam",12}:A.printf("%c",s[3].name);B.printf("%c",s[3].name[1]);C.printf("%c",s[2].name[11]);D.printf("%c",s[1].name[0]);
有以下说明和定义语句 struct student {int age;char num[8]; }; struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}}; struct student*p=stu;以下选项中引用结构体变量成员的表达式错误的是______。A.(p++)->numB.p->numC.*p.numD.stu[0].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++)-numB.p-numC.(*p).numD.stu[3].age
根据下列的定义,能打印出字母P的语句是( )。 struct stu { char name[10]; iht age; }; struct stu s[10]={"John",11, "Paul", 12, "Mary", 11, "adam",12 };A.printf("%c",s[3].name);B.printf("%c",s[3].name[1]);C.printf("%c",s[2].name[1]);D.printf("%c",s[1].name[0]);
根据下列的定义,能打印出字母P的语句是( )。 struct stu {char name[10]; int age; }; struct sm s[10]={"John",11, "Pau1",12, "Mary",11, "adam",12 };A.printf("%c",s[3].name);B.printf("%c",s[3].name[1]);C.printf("%c",s[2].name[1]);D.printf("%c",s[1].name[0]);
【单选题】以下结构体的定义语句中,正确的是______。A.struct student {intnum; char name[10];int age;};stu;B.struct {int num;char name[10];int age;}student; struct studentstu;C.struct student {int num; char name[10];int age;}stu;D.struct student {int num; char name[10]; int age;}; student stu;
根据下面的定义,能输出字符串"Li"的语句是()。 struct person { char name[10]; int age; }; person stu[10]={"Zhang",18, "Li",17, "Ma",18, "Huang",18 };A.cout<< stu[2].name<<endl;B.cout<< stu[2].name[0]<<endl;C.cout<< stu[1].name<<endl;D.cout<< stu[1].name[0]<<endl;
以下结构体的定义语句中,正确的是______。A.struct student {int num; char name[10];int age;};stu;B.struct {int num; char name[10];int age;}student; struct student stu;C.struct student {int num; char name[10];int age;}stu;D.struct student {int num; char name[10]; int age;}; student stu;
若有以下类型说明,错误的叙述是()。 typedef struct {char name[10]; int age; }STU;A.name是结构类型STU的成员B.STU是一个结构类型变量名C.age是一个结构类型名D.age是结构类型STU的成员