注意:此页面搜索的是所有试题
题目内容
(河南工程学院高级语言程序设计)
根据下面的定义,能输出Mary的语句是( )。
struct person
{
char name[9];
int age;
};
struct person class[5]={"John",17,"Paul",19,"Mary",18,"Adam",16};
(A) printf("%s\n",class[1].name);
(B) printf("%s\n",class[2].name);
(C) printf("%s\n",class[3].name);
(D) printf("%s\n",class[0].name);
struct person
{
char name[9];
int age;
};
struct person class[5]={"John",17,"Paul",19,"Mary",18,"Adam",16};
(A) printf("%s\n",class[1].name);
(B) printf("%s\n",class[2].name);
(C) printf("%s\n",class[3].name);
(D) printf("%s\n",class[0].name);
参考答案