[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"q-380010":3},{"question":4,"library":26},{"id":5,"libraryId":6,"type":7,"typeLabel":8,"stem":9,"options":10,"answer":19,"analysis":25},380010,160,1,"单选题","假设以下代码运行环境为32位系统，其中，__attribute__（（packed））的作用是告诉编译器取消结构在编译过程中的优化对齐，按照实际占用字节数进行对齐。代码段1：struct student1{char name[10];long sno;char sex;float score[4];}__attribute__（（packed））*p1,a1,b1;代码段2：union student2{char name[10];long sno;char sex;float score[4];}*p2,a2,b2;sizeof（struct student1）、sizeof（union student2）的结果分别是______。",[11,15,18,22],{"key":12,"text":13,"correct":14},"A","248和128",false,{"key":16,"text":17,"correct":14},"B","31和31",{"key":19,"text":20,"correct":21},"C","31和16",true,{"key":23,"text":24,"correct":14},"D","16和16","本题考查程序开发的基础知识。题目中student1是一个结构体，sizeof（struct student1）结果为结构体student1所有元素字节数之和，因此sizeof（struct student1）结果为：10+4+1+16=31字节。题目中student2是个联合，sizeof（union student2）结果是联合student2中最长一个元素的字节数。因此sizeof（union student2）结果为：16字节。",{"id":6,"name":27,"category":28,"favorite":29},"(中级) 嵌入式系统设计师","职业资格",0]