高等教育 / C++程序设计
根据下面的定义,能输出Mary的语句是( )。 struct person { char name[9]; int age; }; struct person class[5]={"John",17,"Paul",19,"Mary",18,"Adam",16};
(A) printf("%s
",class[1].name);
(B) printf("%s
",class[2].name);
(C) printf("%s
",class[3].name);
(D) printf("%s
",class[0].name);
(A) printf("%s
",class[1].name);
(B) printf("%s
",class[2].name);
(C) printf("%s
",class[3].name);
(D) printf("%s
",class[0].name);
参考答案:
佳题速递: