• 2022-05-26
    已知学生记录描述为: struct student{ int no;char name[20];char sex;struct{int year;int month;int day;}birth; };struct student s; 设变量s中的生日应该是“1984年11月11日”,下列对生日的正确赋值是()
  • s.birth.year=1984;s.birth.month=11;s.birth.day=11;

    举一反三

    内容

    • 0

      已知学生记录描述为 struct student { int no; char name[20]; char sex; struct { int year; int month; int day; } birth; }; struct student s;变量s中的“生日”应是“1985年4月4日”,下列对“生日”的正确赋值方式是______。 A: year=1985;month=4;day=4; B: birtyear=1985;birtmonth=4;birtday=4; C: year=1985;month=4;day=4; D: birtyear=1985;birtmonth=4;birth,day=4;

    • 1

      已知学生记录及变量的定义如下struct student{ int no;char name[20];char sex; struct{ int year,month,day;}birth;}struct student s,*ps;ps=&s;以下能给s中的year成员赋值的语句是 A: s.year=1984; B: ps.year=1984; C: ps->year=1984; D: s.birth.year=1984;

    • 2

      08110062:已知职工记录描述为: struct workers{ int no; char name[20]; char sex; struct{ int day; int month; int year; }birth; }; struct workers w; 设变量w中的“生日”应是“1993年10月25日”,下列对“生日”的正确赋值方式是()。

    • 3

      已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day;}birthday; }; struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______。

    • 4

      已知学生记录描述为[br][/br] struct student[br][/br] {int no;[br][/br] char name[20];[br][/br] char sex;[br][/br] struct[br][/br] {int year; int month; int day;[br][/br] }birth;[br][/br]};[br][/br] struct student s;[br][/br] 设变量s中的“生日”应是“1999年11月11日 A: year=1999;month=11;day=11; B: irth.year=1999;birth.month=11;birth.day=11; C: s.year=1999;s.month=11;s.day=11; D: s.birth.year=1999;s.birth.month=11;s.birth.day=11;