• 2022-06-04
    已知学生记录描述为
    A: s.birth.year=1984;s.birth.month=11;s.birth.day=11;
    B: s.year=1984;s.month=11;s.day=11;
    C: year=1984;month=11;day=11;
    D: birth.year=1984;birth.month=11;birth.day=11;
  • A

    举一反三

    内容

    • 0

      已知学生记录描述为[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;

    • 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

      已知学生记录描述为:struct student { int no ; char name[20]; char sex; struct { int year; int month ; int day ; } birth ; } s ;设结构变量 s 中的“birth”是“1985年10月1日”,则下面正确的赋值方式是( ) A: year=1985 month=10 day=1 B: birth.year=1985birth.month=10birth.day=1 C: s.birth.year=1985s.birth.month=10s.birth.day=1 D: s.year=1985 s.month=10 s.day=1

    • 3

      已知学生记录描述为 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;

    • 4

      已知学生记录描述为:struct student{int no;char name[20];char sex;struct{int year;int month;int day;}birth;}s;设结构变量s中的"birth"应是1985年10月1日“,则下面正确的赋值方式是(  ) 未知类型:{'options': ['year=1985month=10day=1', 'birth.year=1985birth.month=10birth.day=1', 's.year=1985s.month=10s.day-1', 's.birth.year=1985s.birth.month=10s.birth.day-1'], 'type': 102}