有下列结构体,对该结构体变量stu的成员项引用不正确的是( )。 structstudent { int m; Float n; } stu ,*p=&stu; A: stu.n B: p->m C: (*p).m D: p.stu.n
有下列结构体,对该结构体变量stu的成员项引用不正确的是( )。 structstudent { int m; Float n; } stu ,*p=&stu; A: stu.n B: p->m C: (*p).m D: p.stu.n
有下列结构体,对该结构体变量stu的成员项引用不正确的是( )。 struct student int m; float n: stu,*p; A: stu.n B: p->m C: (*p).m D: p.stu.n
有下列结构体,对该结构体变量stu的成员项引用不正确的是( )。 struct student int m; float n: stu,*p; A: stu.n B: p->m C: (*p).m D: p.stu.n
有下列结构体,对该结构体变量stu的成员项引用不正确的是() A: stu.n B: p->m C: (*p).m D: p.stu.n
有下列结构体,对该结构体变量stu的成员项引用不正确的是() A: stu.n B: p->m C: (*p).m D: p.stu.n
下列定义中,()是定义指向Stu对象数组的指针p。 A: Stu*p[5]; B: Stu(*p)[5]; C: (Stu*)p[5]; D: Stu*p();
下列定义中,()是定义指向Stu对象数组的指针p。 A: Stu*p[5]; B: Stu(*p)[5]; C: (Stu*)p[5]; D: Stu*p();
若有定义:struct student{ int age; int num;};struct student stu,*p;则以下正确的赋值语句是()。 A: p=stu; B: *p=*stu; C: *p=&stu; D: p=&stu;
若有定义:struct student{ int age; int num;};struct student stu,*p;则以下正确的赋值语句是()。 A: p=stu; B: *p=*stu; C: *p=&stu; D: p=&stu;
分析下面的程序,下列说法中错误的是 ________ 。 #define NULL 0 #include "conio.h" struct stu { long num; char name[20]; int score; struct stu * next; }; int main() { struct stu *head,*p,*pa,*pb,*pc; pa=(struct stu *)malloc(sizeof(struct stu)); pb=(struct stu *)malloc(sizeof(struct stu)); pc=(struct stu *)malloc(sizeof(struct stu)); scanf("%ld%s%d",&pa->num,pa->name,&pa->score); scanf("%ld%s%d",&pb->num,pb->name,&pb->score); scanf("%ld%s%d",&pc->num,pc->name,&pc->score); head=pa; pa->next=pb; pb->next=pc; pc->next=NULL; p=head; while(p!=NULL) { printf("%ld,%s,%d\n",p->num,p->name,p->score); p=p->next; } }
分析下面的程序,下列说法中错误的是 ________ 。 #define NULL 0 #include "conio.h" struct stu { long num; char name[20]; int score; struct stu * next; }; int main() { struct stu *head,*p,*pa,*pb,*pc; pa=(struct stu *)malloc(sizeof(struct stu)); pb=(struct stu *)malloc(sizeof(struct stu)); pc=(struct stu *)malloc(sizeof(struct stu)); scanf("%ld%s%d",&pa->num,pa->name,&pa->score); scanf("%ld%s%d",&pb->num,pb->name,&pb->score); scanf("%ld%s%d",&pc->num,pc->name,&pc->score); head=pa; pa->next=pb; pb->next=pc; pc->next=NULL; p=head; while(p!=NULL) { printf("%ld,%s,%d\n",p->num,p->name,p->score); p=p->next; } }
根据程序,请判断输出结果:#include<stdio.h>struct stu{int num;char name[5];int age;char sex;};void fun(struct stu *p){printf("%s\n",(*p).name);}main(){struct stu stud[3]={{0001,"zhang",20,'f'},{0002,"li",18,'m'},{0003,"chen",19,'f'}};fun(stud+2);}
根据程序,请判断输出结果:#include<stdio.h>struct stu{int num;char name[5];int age;char sex;};void fun(struct stu *p){printf("%s\n",(*p).name);}main(){struct stu stud[3]={{0001,"zhang",20,'f'},{0002,"li",18,'m'},{0003,"chen",19,'f'}};fun(stud+2);}
若已定义:struct Student {int num; char name[20];}stu,*p; p=&stu;,要访问stu中的num成员,可使用【】。 A: *stu.num B: p->;num C: stu->;num D: p.num
若已定义:struct Student {int num; char name[20];}stu,*p; p=&stu;,要访问stu中的num成员,可使用【】。 A: *stu.num B: p->;num C: stu->;num D: p.num
2.structstudent{ int number;char name[10];};struct student *p,stu[2];p=stu;对stu和p的操作,错误的是: A: p++; B: stu++; C: p+1; D: stu+1;
2.structstudent{ int number;char name[10];};struct student *p,stu[2];p=stu;对stu和p的操作,错误的是: A: p++; B: stu++; C: p+1; D: stu+1;
以下对结构体变量stu成员age的非法引用是( )。 struct<br/>student {<br/>int num;<br/>int age; }; struct<br/>student stu,*p=&stu; A: stu.age B: (*p).age C: student.age D: p->age
以下对结构体变量stu成员age的非法引用是( )。 struct<br/>student {<br/>int num;<br/>int age; }; struct<br/>student stu,*p=&stu; A: stu.age B: (*p).age C: student.age D: p->age