定义如下结构体,则表达式sizeof(stu1)的值是( )。 struct student { char name[8]; int age; struct { int year; int month; int day; } birth; } stu1;
A: 15
B: 24
C: 10
D: 13
A: 15
B: 24
C: 10
D: 13
举一反三
- 以下结构体的定义语句中,正确的是______。? struct student {int num; char name[10];int age;}stu;|struct {int num; char name[10];int age;}student; struct student stu;|struct student {int num; char name[10]; int age;}; student stu;|struct student {int num; char name[10];int age;};stu;
- 以下程序的运行结果是 。 struct date { int year; int month; int day; }; struct student{ char name[10]; char sex; struct date birthday; }stu; 结构体变量stu所占字节数为______
- 以下关于结构体类型及变量的声明正确的是_____ 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;
- 有以下定义的结构体: typedef struct student { int num; char name[10]; int age; } stu1; 则,struct student 是结构体变量名。
- 下列选项中不能够定义一个结构体类型变量stu的是 。 A: struct student { int num; int age; } stu; B: struct student { int num; int age; }; student stu; C: struct {int num; int age; } stu; D: struct student {int num; int age; }; struct student stu;