-->
当前位置:首页 > 题库

单选题:如果结构变量s中的生日是“1984年11月11日”,下列对其生日的正确赋值是()。

Luz5年前 (2021-05-10)题库5305
如果结构变量s中的生日是“1984年11月11日”,下列对其生日的正确赋值是()。
```
struct student
{
int no;
char name[20];
char sex;
struct{
int year;
int month;
int day;
}birth;
};
struct student s;
```
@[D](1)

A. year = 1984; month = 11; day = 11;
B. birth.year = 1984; birth.month = 11; birth.day = 11;
C. s.year = 1984; s.month = 11; s.day = 11;
D. s.birth.year = 1984; s.birth.month = 11; s.birth.day=11;



A.year = 1984; month = 11; day = 11;
B.birth.year = 1984; birth.month = 11; birth.day = 11;
C.s.year = 1984; s.month = 11; s.day = 11;
D.s.birth.year = 1984; s.birth.month = 11; s.birth.day=11;


答案:D