-
根据下面的定义,能输出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);
-
定义以下结构体数组 struct date { int year; int month; int day; }; struct s { struct date birthday; char name[20]; } x[4]={{2008, 10, 1, "guangzhou"}, {2009, 12, 25, "Tianjin"}}; 语句 printf("%s,%d,%d,%d",x[0].name,x[1].birthday.year); 的输出结果为 ( )。(A) guangzhou,2009 (B) guangzhou,2008 (C) Tianjin,2008 (D) Tianjin,2009
-
-
-
-
-
-
-
-