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

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

有以下程序#include <stdio.h>struct st{ int x, y, z;} data[2]={3,10,2,20,15,7};main(){ struct st *p=data; printf("%d,", p->y); printf("%d\n",(++p)->x); }程序的运行结果是A.10,3 B.20,3 C.10,20 D.20,2


参考答案

更多 “ 有以下程序#include stdio.hstruct st{ int x, y, z;} data[2]={3,10,2,20,15,7};main(){ struct st *p=data; printf("%d,", p-y); printf("%d\n",(++p)-x); }程序的运行结果是A.10,3 B.20,3 C.10,20 D.20,2 ” 相关考题
考题 有以下程序:includefun(int a, int b){if(a>b) return(a); elsereturn(b);}main(){int 有以下程序: #include <stdio.h> fun(int a, int b) { if(a>b) return(a); else return(b); } main() { int x=3,y=8,z=6,r; r=fun(fun(x,y),2*z); printf("%d\n",r); } 程序运行后的输出结果是( )。A.3B.6C.8D.12

考题 请选出以下程序的输出结果_______。includesub(x,y,z)int x,y,*z;{*z=y-x;}main(){int 请选出以下程序的输出结果_______。 #include<stdio.h> sub(x,y,z) int x,y,*z; {*z=y-x;} main(){ int a,b,c; sub(10,5,A) ;sub(7,a,B) ;sub(a,b,C) ; printf("%d,%d,%d\n",a,b,C) ; }A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

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

考题 有以下程序:includemain(){int x=3,y=2,z=1; printf("%d\n",x/y~z);程序运行后的 有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y~z); 程序运行后的输出结果是( )。A.3B.2C.1D.0

考题 以下程序执行后的输出结果是include using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include <iostream> using namespace std; void try(int,int,int,int); int main () { int x,y,z,r; x =1 ; y = 2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y,int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 以下程序执行后的输出结果是includeusing namcspace std;void try(int,int,int,int); 以下程序执行后的输出结果是 #include<iostream> using namcspace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 请选出以下程序的输出结果______。includesub(x,y,z)int x,y,*z;{ *z=y-x;}main(){int 请选出以下程序的输出结果______。 #include<stdio.h> sub(x,y,z) int x,y,*z; { *z=y-x;} main(){ int a,b,c; sub(10,5,a);sub(7,a,b);sub(a,b,c); printf("%d,%d,%d\n",a,b,c); }A.5,2,3B.-5,-12,-7C.-5,-12,-17D.5,-2,-7

考题 以下程序执行后的输出结果是()。includeusing namespace std;void try(int,int,int,in 以下程序执行后的输出结果是( )。 #include<iostream> using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<endl; return 0; } void try(int x,int y, int z,int r) { z = x+y; X = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定

考题 以下程序执行后的输出结果是include.using namespace std;void try(int,int,int,int) 以下程序执行后的输出结果是 #include<iostream>. using namespace std; void try(int,int,int,int); int main() { int x,y,z,r; x=1; y=2; try(x,y,z,r); cout<<r<<end1; return 0; } void try(int x,int y, int z,int r) { z = x+y; x = x*x; y = y*y; r = z+x+y; }A.18B.9C.10D.不确定