早教吧 育儿知识 作业答案 考试题库 百科 知识分享

在如下结构体中,不正确的是。A.structstudent{charname[10];floatscore;};B.struct{charname[10];floatscore;}stu[5];C.structstudent{charname[10];floatscore;}stu[5];D.structs

题目详情
在如下结构体中,不正确的是________。
A.
struct student {char name[10]; float score; };

B.
struct {char name[10]; float score; } stu[5];

C.
struct student {char name[10]; float score; } stu[5];

D.
struct stu[5] {char name[10];float score; };
▼优质解答
答案和解析
D 不对 中括号[] 处会报错
A 是正常的结构体定义
B 直接定义结构体数组stu,无结构体名字,不可再定义结构体其他变量
C 结构体正常定义