变量a所占的内存字节数是________。(假设整型int为4字节) struct stu { char name[20]; long int n; int score[4]; } a ;
A.28
B.30
C.32
D.46
- · 有4位网友选择 B,占比33.33%
- · 有4位网友选择 C,占比33.33%
- · 有3位网友选择 D,占比25%
- · 有1位网友选择 A,占比8.33%
A.28
B.30
C.32
D.46
union U
{char st[4];
int i;
longl;
};
structA
{ int c;
union U u;
}a;
A.4 B.6 C.5 D.8
Struct stud
{ char hum[6];
int s[4];
double ave;
} a,*p;
A、A B C D
B、A B C D
C、A B C D
D、A B C D
用struct student结构体类型,存储10名学生的信息。 #include struct _____________ { int year; int month; int day; }; _________________ { int number; char name[9]; char sex[3]; int hight; int weight; struct birthday date_of_birth ; char phone[12]; char address[30]; }; void main( ) { struct student _________= {{83104001,"欧阳易婷","女",160,45,1989,12,24,"13705237529","江苏南京"}, {83104002,"马超","男",185,84,1989,10,21,"13904237327","江苏苏州"}, {83104003,"余金英","女",164,52,1989,9,20,"13223608229","江苏南京"}, {83104004,"江晓芸","女",160,50,1989,10,3,"13851556480","江苏淮安"}, {83104005,"马静静","女",160,46,1989,8,24,"13942305828","江苏淮安"}, {83104006,"梁金飚","男",175,80,1989,7,2,"15243480232","江苏南京"}, {83104007,"蒋叶芳","女",158,45,1989,11,5,"13125248613","江苏南京"}, {83104008,"胡芳","女",159,45,1989,12,23,"15842377493","江苏扬州"}, {83104009,"孙维平","男",175,70,1989,10,15,"13641407668","江苏扬州"}, {83104010,"钱多多","男",170,65,1989,9,26,"13908237227","江苏扬州"}}; printf("-------------------------------------------------------------------\n"); printf(" 学号\t 姓名 性别 身高 体重 出生日期 电话\t 住址\n"); printf("-------------------------------------------------------------------\n"); int i; for(i=0;_________;i++) { printf("%d %-8s %s %d %d %d.%2d.%2d %s %s\n", stu[i].number,stu[i].name,stu[i].sex,stu[i].hight,stu[i].weight, stu[i].date_of_birth.year,stu[i].date_of_birth.month,stu[i].date_of_birth.day, stu[i].phone,stu[i].address); printf("-------------------------------------------------------------------\n"); } }
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!