题目内容

若有定义typedef int*T;T*a[20];则以下与上述定义中a类型完全相同的是第1

A. int**a[20];
B. int(*a)[20];
C. int*(*a)[20];
D. int*a[20];

查看答案
更多问题

有以下程序#include#includetypedef struct{charname[10];charsex;intage;}STU;voidfun(STU*t){strcpy((*t).name,"Tong");(*t).age++;}main(){STUs[2]={"Hua",'m',18,"Qin",'f',19};fun(s+1);printf("%s,%d,%s,%d\n",s[0].name,s[0].age,s[1].name,s[1].age);}程序运行后的输出结果是

A. Hua,18,Tong,20
B. Hua,18,Qin,19
C. Tong,19,Qin,19
D. Hua,19,Tong,19

有以下程序#include#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(STUc){strcpy(c.name,"Qian");c.gender='f';c.score=350;}main(){STUa={"Zhao",'m',290},b;b=a;f(b);printf("%s,%c,%d,",a.name,a.gender,a.score);printf("%s,%c,%d\n",b.name,b.gender,b.score);}程序的运行结果是

A. Zhao,m,290,Zhao,m,290
B. Zhao,m,290,Qian,m,290
C. Zhao,m,290,Qian,m,350
D. Zhao,m,290,Qian,f,350

为了建立如图所示的存储结构(即每个结点含两个域,data是数据域,next是指向结点的指针域)则在()处填入的选项是()。structlink{chardata;()}node;datanext

A. structlink*next;
B. linknext;
C. link*next;
D. structlinknext;

有以下程序#includetypedef struct stu{charname[10];chargender;intscore;}STU;voidf(STUa,STU*b,STUc){*b=c=a;printf("%s,%c,%d,",b->name,b->gender,b->score);printf("%s,%c,%d,",c.name,c.gender,c.score);}main(){STUa={"Zhao",'m',290},b={"Qian",'f',350},c={"Sun",'m',370};f(a,&b,c);printf("%s,%c,%d,",b.name,b.gender,b.score);printf("%s,%c,%d\n",c.name,c.gender,c.score);}程序运行后的输出结果是

A. Zhao,m,290,Zhao,m,290,Zhao,m,290,Sun,m,370
B. Zhao,m,290,Zhao,m,290,Zhao,m,290,Zhao,m,290
C. Zhao,m,290,Zhao,m,290,Qian,f,350,Sun,m,370
D. Zhao,m,290,Zhao,m,290,Qian,f,350,Zhao,m,290

答案查题题库