根据以下定义,能打印出字母M的语句是( )struct person{char name[10];int age;};struct person class[10]={ “John”,17, “Paul”,19, “Mary”,18, “Adam”,18};
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]);
设有一结构体类型变量定义如下,若对结构体变量w1的出生年份进行赋值,下面正确的赋值语句是( )struct date{int year;int month;int day;};struct worker{char name[20];char sex;struct date birthday;}w1;
A. year=1999
Birthday.year=1999
C. w1.year=1999
D. w1.birthday.year=1999