数据结构里,struct student { char name[20]; char sex[10]; int age; int score; }; 定义结构体后,定义变量、数组赋值正确的是()。
- A、struct student s={"张三","男",18,100};
- B、struct student stu[3]={{"张三","男",18,100},{"李四","男",19,90},{"王五","男",23,97}};
- C、struct student s={"李四";"女";18;100};
- D、struct student stu[3]={{"张三",18,"男",100},{"李四",19,"男",90},{"王五",23,"男",97}};
正确答案:A,B
答案解析:有
微信扫一扫手机做题