设有下面的定义:struct student{ int id; char *name; int math;}stud1;关于结构体变量赋值正确的是()。
A: stud1.id=1001; stud1.name="Jasmine";
B: id=1001; *stud1.name="Jasmine";
C: stud1.id=1001; stud1.*name="Jasmine";
D: stud1.id=1001; *stud1.name="Jasmine";
A: stud1.id=1001; stud1.name="Jasmine";
B: id=1001; *stud1.name="Jasmine";
C: stud1.id=1001; stud1.*name="Jasmine";
D: stud1.id=1001; *stud1.name="Jasmine";
举一反三
- 设有下面的定义:struct student{ int id; char *name; int math;}stud1;关于结构体变量赋值正确的是()。 A: stud1.id=1001; stud1.name="Jasmine"; B: id=1001; *stud1.name="Jasmine"; C: stud1.id=1001; stud1.*name="Jasmine"; D: stud1.id=1001; *stud1.name="Jasmine";
- 在如下结构体定义中,不正确的是○。 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];
- 若有以下定义,则能打印出字母M的语句是( )。struct person{ char name[12]; int num;};struct person class[8]={"Linan",20,"zhanghai",18,"Maming",23,"wanghua",25,"chenqi",17};? printf("%c",class[2].name[1]);|printf("%c",class[3].name[1]);|printf("%c",class[2].name[0]);|printf("%c",class[3].name);
- 以下对结构体类型的变量定义中不正确的是 。 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;
- 在JSP页面中,正确引入JavaBean的是()。 A: <%jsp: useBean id ="myBean” scope ="page” class="pkg.MyBean" %> B: <jsp: useBean name ="myBean” scope ="page” class="pkg.MyBean"> C: <jsp: useBean id ="myBean” scope ="page” class="pkg.MyBean”/> D: <jsp: useBean name ="myBean” scope ="page” class="pkg.MyBean”/>