• 2022-05-26
    已知学生记录描述为: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}
  • D
    本题目来自[网课答案]本页地址:https://www.wkda.cn/ask/aotoxpjtoyxxzzo.html

    举一反三

    内容

    • 0

      已知学生记录描述为: struct student{ int no;char name[20];char sex;struct{int year;int month;int day;}birth; };struct student s; 设变量s中的生日应该是“1984年11月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中的“生日”是1984年11月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;

    • 3

      已知学生记录描述为:struct student{ int num; char name[20]; struct { int year;int month;int day;}birth;};struct student s;下列对“生日”的正确赋值方式是( ) A: year=1980; month=6; day=11; B: birth.year=1980;birth.month=6;birth.day=11; C: s.year=1980; s.month=6; s.day=11; D: s.birth.year=1980; s.birth.month=6; s.birth.day=11;

    • 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;