• 2022-06-10
    若有如下说明语句,则下面叙述中不正确的是struct student{long num;char name[20]; char sex;int age;} stu;
  • D. stu是结构体类型名

    内容

    • 0

      下面C语言语句定义了。 struct student { int num; char name[20]; char sex; }s1,s2;

    • 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

      有如下结构体定义,能够正确引用结构体的是()。 struct student { long num; char name[10]; char sex; int age; float score; }stu;

    • 3

      有如下定义:struct student{ int num; char name[20]; int age;};struct student stu[30];下面输入语句正确的是()。 A: scanf("%d",&stu.age); B: scanf("%d",stu[0].age); C: scanf("%d",&stu[0].age); D: scanf("%d",stu.age);

    • 4

      5.若有如下说明语句,则定义了union student{ long num; char name[20]; char sex; int age;} ; A: 共用体变量 B: 结构体变量 C: 结构体类型 D: 共用体类型