已知: Struct st{ Int num; Char sex; Float score; }stud,*p=&stud; 则对于结构体变量stud的成员num正确的引用是_________。
p->num
举一反三
- 已知: struct st{ int num; char sex; float score; }stud,*p=&stud; 则对于结构体变量stud的成员num正确的引用是____。 A: stud->num B: st.num C: p->num D: p.num
- 已知:[br][/br] struct st { int num; char sex; float score; }stud,*p=&stud; 则对于结构体变量stud的成员num正确的引用是______。 A: stud->num B: st.num C: p->num D: p.num
- 以下对结构体类型的变量定义中不正确的是 。 A: B: define STUD struct student STUD {long num; char name[20]; char sex; float score;}; STUD stud1,stud2; C: struct student {long num; char name[20]; char sex; float score; }stud1,stud2; D: struct {long num; char name[20]; char sex; float score; } stud1,stud2; E: struct {long num; char name[20]; char sex; float score; }student;struct student stud1,stud2;
- 在如下结构体定义中,不正确的是○。 A: struct student { int no; char name[10]; float score; } B: struct stud[20] { int no; char name[10]; float score; } C: struct student { int no; char name[10]; float score; }stud[20]; D: struct{int no;char name[10];float score;}stud[100];
- struct student { int num; char sex; char name[20]; float score; } st ; 其中num是结构体 ________
内容
- 0
struct student { int num; char sex; char name[20]; float score; } st ; 给st的num成员赋值为16,应写出的语句是 ;
- 1
设有以下说明: struct stud{ char num[6]; int s[4]; double ave;}a; 则变量a在内存所占字节数是________。
- 2
有如下结构体定义,能够正确引用结构体的是()。 struct student { long num; char name[10]; char sex; int age; float score; }stu;
- 3
下列结构体中定义正确的是 A: record{<br/>int no;<br/>char num[16];<br/>float score;<br/>} B: struct record{<br/>int no;<br/>char num[16];<br/>float score;<br/>} C: struct record{<br/>int no;<br/>char num[16];<br/>float score;<br/>}; D: struct record{<br/>int no<br/>char num[16]<br/>float score<br/>};
- 4
设有以下结构类型说明和变量定义,则变量a在内存所占字节数是_______(TC环境),________表示结构体a变量的成员num数组的元素num[2]。 struct stud {char num[6]; int s[4]; double ave; }a;