有如下定义: struct person{char name[9];int age;}; struct person class[10]={"Johu",17,"Paul",19,"Mary",18,"Adam",16,};根据上述定义,能输出

admin2009-02-15  21

问题 有如下定义:    struct person{char name[9];int age;};    struct person class[10]={"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[O]);

答案8

解析 该题主要考查C语言数组下标的概念,即C语言中数组的下标是从。开始的。
转载请注明原文地址:https://kaotiyun.com/show/Q8Xp777K
0

相关试题推荐
最新回复(0)