• 2022-07-23
    以下变量定义,错误的是:
    A: struct student{int num, char name[20];} s;
    B: struct {int num, char name[20];} s;
    C: struct student{int num, char name[20];}; struct student s;
    D: struct student{int num, char name[20];} ; student s
  • D

    举一反三

    内容

    • 0

      struct student { int num; char sex; char name[20]; float score; } st ; 其中num是结构体 ________

    • 1

      以下对结构体类型的变量定义中不正确的是 。 A: B: define STUD struct student STUD {long num; char name[20]; char sex; float score;}; STUD stud1,stud2; C: struct student {long num; char name[20]; char sex; float score; }stud1,stud2; D: struct {long num; char name[20]; char sex; float score; } stud1,stud2; E: struct {long num; char name[20]; char sex; float score; }student;struct student stud1,stud2;

    • 2

      以下各项用于定义结构体类型,并定义结构体变量,其中正确的是________。 A: struct student { char num[5]; int score; }; student stu1,stu2; B: struct student{ char num[5]; int score;};struct student stu1 stu2; C: struct student { char num[5]; int score=96; }; struct student stu1,stu2; D: struct student{ char num[5]; int score;};struct student stu1,stu2;

    • 3

      以下各项用于定义结构体类型,并定义结构体变量,其中正确的是________。 A: struct student { char num[5]; <br> int score; <br> }; <br> student stu1,stu2; B: struct student { char num[5]; int score; }; struct student stu1 stu2; C: struct student { char num[5]; int score=96; }; struct student stu1,stu2; D: struct student { char num[5]; int score; }; struct student stu1,stu2;

    • 4

      在下列结构类型和变量定义中,______选项是正确的。 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;