• 2022-10-27
    在下列结构类型和变量定义中,______选项是正确的。
    A: struct student{int number, chur name[20],)s;
    B: struct {int number, chur name[20],};s;
    C: struct student{int number, chur name[20];};s;
    D: struct student{int number, chur name[20];)s;
  • D

    内容

    • 0

      以下关于结构体类型及变量的声明正确的是_____ A: struct student{char name[16];int age}stu1; B: struct student{int age, rank}stu1; C: struct student{char name[16];int age;float score;};student stu1; D: struct student{char name[16];int age, rank;float score;};struct student student;

    • 1

      下列声明结构体变量错误的是( ) A: A.struct student  { int no; char name[16]; }st1,st2; B: B. struct student{ int no;char name[16];};struct student st1,st2; C: C.struct student { int no; char name[16]; }; struct st1,st2; D: D.struct student{ int no;char name[16]; };student st1,st2;

    • 2

      下列结构体的定义正确的是( )。 A: student { int num; char name[10]; char sex; }; B: struct student { int num; char name[10]; char sex; } C: struct student { int num; char name[10]; char sex; }; D: struct student { int num char name[10] char sex };

    • 3

      若有以下定义,则对变量student1中“生日”的正确赋值方式是( )。 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;

    • 4

      9.若有以下定义,则对变量student1中“生日”的正确赋值方式是 struct student { int num; char name[20], sex; struct { int year, month, day; } birthday; } ; struct student student1;