若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。struct student{ int num; char name[20], sex; struct { int year, month, day; } birthday;} ; struct student student1;
A: student1.birthday.year = 2003;student1.birthday.month = 5;student1.birthday.day = 1;
B: year = 2003;month = 5;day = 1;
C: birthday.year = 2003;birthday.month = 5;birthday.day = 1;
D: student1.year = 2003;student1.month = 5;student1.day = 1;
A: student1.birthday.year = 2003;student1.birthday.month = 5;student1.birthday.day = 1;
B: year = 2003;month = 5;day = 1;
C: birthday.year = 2003;birthday.month = 5;birthday.day = 1;
D: student1.year = 2003;student1.month = 5;student1.day = 1;
举一反三
- 若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;
- 9.若有以下定义,则对变量student1中“生日”的正确赋值方式是 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;
- 已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day;}birthday; }; struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______。
- 已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day; }birthday; }; struct student stu;设变量stu中的"生日"是"1995年11月12日",对"birthday"正确赋值的程序是______。 A: year=1995;month=11;day=12; B: stu.year=1995;stu.month=11;stu.day=12; C: birthday.year=1995;birthday.month=11;birthday.day=12; D: stu.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;
- 已知对学生记录的描述为:[br][/br] struct student { int num; char name[20],sex; struct{ int year,month,day;}birthday; }; struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______。 A: year=1995;month=11;day=12; B: stu.year=1995;stu.month=11;stu.day=12; C: irthday.year=1995;birthday.month=11;birthday.day=12; D: stu.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;