题目内容

写出下面程序段的输出结果________。struct stu{int x,*y;}*p;int d[4]={10,20,30,40};struct stua[4]={50,&d[0],60,&d[1],70,&d[2],80,&d[3]};p=a;printf("%d,",++p->x);printf("%d,",(++p)->x);printf("%d\n,",++(*p->y));

查看答案
更多问题

写出以下程序段的输出结果________。struct st{ int x,*y;}*p;int s[]={1,2,3,4};struct sta[]={1,&s[0],2,&s[1],3,&s[2],4,&s[3]};p=a;printf("%d\n",++(*(++p)->y));

写出以下程序段的输出结果________。struct tt{int x;struct tt *y;}*p;struct tta[4]={20,a+1,15,a+2,30,a+3,17,a};int i;p=a;for(i=1;i<=4;i++){printf("%-4d",p->x); p=p->y;}

阅读下列程序,并写出运行结果________。#includestruct data{ int a, b, c; };void func(struct data parm){parm.a=18;parm.b=5;parm.c=parm.a*parm.b;printf("parm.a=%d parm.b=%dparm.c=%d\n",parm.a,parm.b,parm.c);}int main(){struct data arg;arg.a=27;arg.b=3;arg.c=arg.a+arg.b;func(arg);printf("arg.a=%d arg.b=%darg.c=%d\n",arg.a,arg.b,arg.c);return0;}

阅读下列程序,写出运行结果________。#includestruct data{ int a, b, c; };void func(struct data *parm){parm->a=18;parm->b=5;parm->c=parm->a*parm->b;printf("parm->a=%dparm->b=%d parm->c=%d\n",parm->a,parm->b,parm->c);}int main(){struct data arg;arg.a=27;arg.b=3;arg.c=arg.a+arg.b;func(&arg);printf("arg.a=%d arg.b=%darg.c=%d\n",arg.a,arg.b,arg.c);return 0;}

答案查题题库