• 2022-06-08
    对结构体类型变量定义不正确的是( )。
    A:
    B: define STUDENT struct studentSTUDENT{char name;int num;}std;
    C: struct student{char name;int num;}stu;
    D:
    E: define struct student{char name;int num;}STD;STD stu;
    F: struct{char name;int num;}student;struct student stu;
  • D

    内容

    • 0

      以下各项用于定义结构体类型,并定义结构体变量,其中正确的是________。 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;

    • 1

      下面定义结构变量的语句中错误的是。 未知类型:{'options': ['struct student{ int num; char name[20]; } s;', 'struct { int num; char name[20]; } s;', 'struct student{ int num; char name[20]; }; struct student s;', 'struct student{ int num; char name[20]; }; student s;'], 'type': 102}

    • 2

      以下对结构体类型的变量定义中不正确的是 。 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;

    • 3

      有以下程序段,输出结果为()。 #include<stdio.h> struct student {int num; char name[20]; float score; }; main() {struct student stu[5]; printf("%d",sizeof(stu)); }

    • 4

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