有如下定义: 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]);
有如下定义: 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]);
相关考题:
有如下定义struct person{char name[9];int age;};struct person class[10]={"John",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]);
有以下程序:includeincludeusingnameSpacestd;classperson{ intage; Char*nam 有以下程序:include <iostream>include <string>using nameSpace std;class person{int age;Char * name;public:person ( int i, Char * str ){int j;j = strlen( str ) + 1;name = new char[ j ];strcpy( name, str );age = i;}~person(){delete name;cout<<"D";}void display(){cout<<name<<":"<<age;}};int main(){person demo( 30,"Smith" );demo.display();return 0;}则该程序的输出结果为:【 】。
有如下定义: struct person {char name[9];int age;} struct person class[10]={ "John",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]);
设有以下语句: struct SS { int no; char name[10];}PERSON; 则下面叙述中错误的是 ( )A.struct是结构体类型的关键字B.struct SS是结构体类型C.PERSON是结构体类型名D.name是结构体成员名
有如下定义struct person {char name[9];int age;};struct person class[10]={"John",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));
有如下定义: struct person {char name[9];int age;}; struct person class[10]={"John",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;}class[10]={"Johu",17,"Paul",19,"Mary",18,"Adam",16}; A、prinft("%c\n",class[3].nane);B、pfintf("%c\n",class[3].name[1]);C、prinft("%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};A.printf("%cn",class[3].name);B.printf("%cn",class[3].name[1]);C.printf("%cn",class[2].name[1]);D.printf("%cn",class[2].name[0]);
根据下述定义,能输出字母M的语句是()。 struct person {char name[9]; int age;}; struct person class[10]={"Johu",17,"Paul",19,"Mary",18,"Adam",16};A.printf("%c",class[3].name);B.printf("%c",class[2].name[0]);C.printf("%c",class[3].name[1]);D.printf("%c",class[2].name[1]);