struct student{int num; //4个字节char name[20]; char sex; //也要为4个字节(4个字节对齐)int age;float score;char addr[30];}student1,student2; 这是结构体,应该放在主函数外面。还有系统的字对齐问题,
结构体应该放在主函数的外面的