根据下述定义,能输出字母M的语句是:strcut person{char name[9];int age;};struct person class[10]={"John",17,"Paul",19,"Mary",18,"Adam",16};
A: class[3].name
B: class[2].name[0]
C: class[3].name[1]
D: class[2].name[1]
A: class[3].name
B: class[2].name[0]
C: class[3].name[1]
D: class[2].name[1]
举一反三
- 有如下定义struct person{char name[9];int age;};struct person class[10]={"John",17,"paul",19,"Mary",18,"Adam",16,};则能输出字母M的语句是( )。 A: cout<<class[3].name; B: cout<<class[3].name[1]; C: cout<<class[2].name[1]; D: cout<<class[2].name[0];
- 有如下定义struct person{ char name[9]; int age;}; struct person class[4]={ "Johu",17, "Paul",19, "Mary",18, "Adam",16};根据以上定义,能输出字母M的语句是( )。 A: printf("%c\n",class[3].name); B: printf("%c\n",class[3].name[1]); C: printf("%c\n",class[2].name[1]); D: printf("%c\n",class[2].name[0]);
- 根据以下定义,能输出字母M的语句是 struct person{char name[9];int age;}; struct person class[10]={“John”,17,”Paul”,19,”Mary”,18,”Adam”,16,};
- 中国大学MOOC: 有如下定义struct person{char name[9];int age;};struct person class[10]={John,17,paul,19,Mary,18,Adam,16,};则能输出字母M的语句是( )。
- 若有以下定义,则能打印出字母M的语句是( )。struct person{ char name[12]; int num;};struct person class[8]={"Linan",20,"zhanghai",18,"Maming",23,"wanghua",25,"chenqi",17};? printf("%c",class[2].name[1]);|printf("%c",class[3].name[1]);|printf("%c",class[2].name[0]);|printf("%c",class[3].name);