网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有以下程序

#include <stdio.h>

struct ord

{ int x,y; } dt[2]={1,2,3,4};

main()

{ struct ord *p=dt;

printf("%d,",++p->x); printf("%d\n",++p->y);

}

程序的运行结果是

A)1,2

B)2,3

C)3,4

D)4,1


参考答案

更多 “ 有以下程序#include stdio.hstruct ord{ int x,y; } dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf("%d,",++p-x); printf("%d\n",++p-y);}程序的运行结果是A)1,2B)2,3C)3,4D)4,1 ” 相关考题
考题 (37)有以下程序#include stdio.hstruct ord{ int x,y;} dt[2]={1,2,3,4};main(){ struct ord *p=dt;printf (“%d,”,++p-x); printf(“%d\n”,++p-y);}程序的运行结果是A)1,2 B)2,3 C)3,4 D)4,1

考题 请选出以下程序的输出结果includemain(){ int a[]={1,2,3,4},i;int x=0;for(i=0;i 请选出以下程序的输出结果 #include<stdio.h> main() { int a[]={1,2,3,4},i; int x=0; for(i=0;i<4;i++) { sub(a,x);printf("%d",x);} printf("\n");} sub(s,y) int*s,y; { static int t=3; y=s[t];t--; }A.1 2 3 4B.4 3 2 1C.0D.4444

考题 有以下程序includestruct ord{ int x,y;} dt[2]={1,2,3,4};mare(){struct ord*p=dt; p 有以下程序 #include<stdio.h> struct ord { int x,y;} dt[2]={1,2,3,4}; mare() { struct ord*p=dt; printf("%d,",++p->x); printf("%d\n",++p->y); } 程序的运行结果是______。A.1,2B.2,3C.3,4D.4,1

考题 有以下程序#includestdio.hstruct ord{int x,y;} dt[2]={1,2,3,4};main(){struct ord*p=dt;printf(“%d,”,++(p一x));printf(“%d\n”,++(p一y));}程序运行后的输出结果是A.1,2B.4,1C.3,4D.2.3

考题 请选出以下程序的输出结果_______。 includesub(int*s,inty){ static int t=3,y=s[t];t 请选出以下程序的输出结果_______。 #include<stdio.h> sub(int*s,inty) { static int t=3, y=s[t];t-; } main() { int a[]={1,2,3,4},i,x=0; for(i=0;i<4;i++){ sub(a,x);printf("%d",x);} printf("\n"); }A.1234B.4321C.0D.4444

考题 有以下程序: #includestdio.h struct ord {int X,y;)dt[2]={1,2,3,4}; main( ) { struct ord*p=dt; printf("%d,",++(p-x));printf("%d\n",++(p-y)); } 程序运行后的输出结果是( )。A.1,2B.4,1C.3,4D.2,3

考题 以下程序的输出结果是includestruct st{ int x;int *y;}*p;int dt[4]={10,20,30,40};s 以下程序的输出结果是 #include<stdio.h> struct st { int x;int *y;}*p; int dt[4]={10,20,30,40}; struct st aa[4]={50,dt[0],60,dt[0],60,dt[0],60,dt[0],}; main() { p=aa; printf("%d\n",++(p->x));}A.10B.11C.51D.60

考题 以下程序的输出结果是()。includestruct st{int x;int*y;}*p; int dt[4] ={ 10,20,30,4 以下程序的输出结果是( )。 #include<stdio.h> struct st { int x; int *y;} *p; int dt[4] ={ 10,20,30,40 }; struct st aa[4]={ 50,dt[0],60,dt[0],60,dt[0],60,dt[0]}; main() { p=aa; printf("%d\n",++(p->x)); }A.10B.11C.51D.60

考题 (37)有以下程序#include stdio.hstruct ord{ int x,y;}dt[2]={1,2,3,4};main(){struct ord *p=dt;printf("%d,",++(p-x)); printf("%d\n",++(p-y));}程序运行后的输出结果是A)1,2B)4,1C)3,4D)2,3