niusouti.com

已知学生记录描述为:struct student{ int no;char name[20],sex;struct{ int year,month,day;} birth;};struct student s;设变量s中的"生日"是"1984年11月12日",对"birth"正确赋值的程序段是A.year=1984;month=11;day=12;B.s.year=1984;s.month=11;s.day=12;C.birth.year=1984;birth.month=11;birth.day=12;

题目

已知学生记录描述为:

struct student

{ int no;

char name[20],sex;

struct

{ int year,month,day;

} birth;

};

struct student s;

设变量s中的"生日"是"1984年11月12日",对"birth"正确赋值的程序段是

A.year=1984;month=11;day=12;

B.s.year=1984;s.month=11;s.day=12;

C.birth.year=1984;birth.month=11;birth.day=12;

D.s.birth.year=1984;s.birth.month=11;s.birth.day=12;


相似考题
参考答案和解析
正确答案:D
更多“已知学生记录描述为: structstudent {intno; charname[20],sex; struct {intyear,month ”相关问题
  • 第1题:

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


    stu.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;

  • 第2题:

    【单选题】已知对学生记录的描述为: 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.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;

    C.birthday.year=1995;birthday.month=11;birthday.day=12;

    D.stu.year=1995;stu.month=11;stu.day=12;


    时间维

  • 第3题:

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


    stu.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;

  • 第4题:

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


    stu.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;

  • 第5题:

    【单选题】已知对学生记录的描述为: 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;


    时间维