首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

若有以下定义的语句 struct student { int age; int num; }; struct student stu[3]={{1001,20},

若有以下定义的语句

struct student

{ int age;

int num; };

struct student stu[3]={{1001,20},{1002,19},{1003,21}};

main()

{ struct student *p;

p=stu;

… }

则以下不正确的引用是

A.(p++)->num

B.p++

C.(*p).num

D.P=&stu.age.

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“若有以下定义的语句 struct student { int…”相关的问题
第1题
若有以下定义的语句 struct student { int age; int num; }; struct student stu[3]={{1001,20},

若有以下定义的语句

struct student

{ int age;

int num; };

struct student stu[3]={{1001,20},{1002,19},{1003,21}};

main()

{ struct student *p;

p=stu;

… }

则以下不正确的引用是

A.(p++)->num

B.p++

C.(*p).num

D.P=&stu.age.

点击查看答案
第2题
若有以下定义的语句:struct student{ int age; int num;};struct student stu[3]={{1001,20},{10

若有以下定义的语句: struct student { int age; int num;}; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; main() { struct student *p; p=stu; …} 则以下不正确的引用是()。

A.(p++)->num

B.p++

C.(*p).num

D.P=&stu.age.

点击查看答案
第3题
有以下的定义语句:structstudent{intnum;charname[9];};则不能正确定义结构数组并赋初始值的是()。

A.structstudentstu[2]={1,"zhangsan",2,"lisi"}

B. struct student stu[2]={1, "zhangsan",2,"li si"}

C. struct student stu[2]={{1,"zhangsan"},{2,"li si"}};

D. struct stu[]={{1,"zhangsan"},{2,"li si"}}

点击查看答案
第4题
若有如下定义:struct stu{char name[9];int age;float score;);struct stu class[10]={{"Li",17,

若有如下定义: struct stu{char name[9];int age;float score;); struct stu class[10]={{"Li",17,67},{"Song",19,80}, {"guo",18,79},{"Zhao",16,69}}; 根据上面的定义,若执行“printf("%s:%d%f",class[3].name,class[3].age,class[3].score);"则输出的正确结果是()。

A.Song:19,80.000000

B.Zhao:16,69.000000

C.Li:17,67Song;19,80

D.guo:18,79Zhao;16,69

点击查看答案
第5题
若有以下定义和语句struct a{int n,m;};struct a st[3]={{1,20},{2,19},{3,21}};struct a*p=st;

若有以下定义和语句 struct a { int n,m;}; struct a st[3]={{1,20},{2,19},{3,21}}; struct a*p=st; 则以下错误的引用是

A.(p++)->n;

B.st[0].n;

C.(*p).n;

D.p=&st.m;

点击查看答案
第6题
若有以下定义和语句 struct a{ int n,m;}; struct a st[3]={{2,3},{4,5},{6,7}}; struct a*p=st;则以下错误的引用是

A.(p++)->n;

B.st[0].n;

C.(*p).n;

D.P=&st.m,

点击查看答案
第7题
若有以下定义:struct fink{int data; struct link*next;}a,b,c,*p,*q;且变量a和b之间已有如下图

若有以下定义: struct fink { int data; struct link*next; } a,b,c,*p,*q; 且变量a和b之间已有如下图所示的链表结构:

若有以下定义:struct fink{int data; struct link*next;}a,b

指针p指向变量a,q指向变量c。则能够把c插入到a和b之间并形成新的链表的语句组是:

A.a.next;c;c.next=b;

B.p.next=q;q.next=p.next;

C.p->next=&c;q->next=p->next;

D.(*p).next=q;(*q).next=&b;

点击查看答案
第8题
若有语句typedef struct S{int g; char h;}T;,则下列叙述正确的是()

A.可用S定义结构体变量

B.可用T定义结构体变量

C.S是struct类型的变量

D.T是struct S类型的变量

点击查看答案
第9题
若有如下程序:struct student{char name[10];float score[3];}stu[3]={{"lili",75,90,90}, {"liu

若有如下程序: struct student {char name[10]; float score[3];}stu[3]={{"lili",75,90,90}, {"liudan",90,85,75}; {"guoli",85,85,70}}; main() {int i;float sum=0,aver; for(i=0;i<3;i++) sum=sum+stu[i].score[1]; aver=sum/i; printf("%6.2f\n",aver); } 则程序运行后的输出结果是()

A.83.33

B.85

C.86

D.86.67

点击查看答案
第10题
若有以下结构体定义,则是正确的引用或定义。struct example{ int x;int y;}v1;A.example.x=10B.ex

若有以下结构体定义,则是正确的引用或定义。struct example{ int x; int y;}v1;

A.example.x=10

B.examplev2.x=10

C.struct v2;v2.x=10

D.struct example v2={10};

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改