网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
若有宏定义如下: #define X 5 #define Y X+1 #define Z Y*X/2以下程序段的输出结果是______。 int a;a=Y; printf("%d\n",Z); printf("%d\n",--a);
A.7 6
B.12 6
C.12 5
D.7 5
参考答案
更多 “ 若有宏定义如下: #define X 5 #define Y X+1 #define Z Y*X/2以下程序段的输出结果是______。 int a;a=Y; printf("%d\n",Z); printf("%d\n",--a);A.7 6B.12 6C.12 5D.7 5 ” 相关考题
考题
设有如下宏定义#define MYSWAP(z,x,y){z=x;x=y;y=z;}以下程序段通过宏调用实现变量a,b内容交换,请填空。float a=5,b=16,c;MYSWAP(( ),a,b);
考题
设有如下宏定义define MYSWAP(z,x,y){z=x;x=Y;Y=z;}以下程序段通过宏调用实现变量a、b内容的交换,请填空。float a=5,b=16,c;MYSWAP( 【 】,a,b) ;
考题
若有以下程序段:include using namespace std;int main (){ int a[]={1,4,5}; int *p
若有以下程序段: #include <iostream> using namespace std; int main () { int a[]={1,4,5}; int *p=a[0],x=6, y,z; for (y=0; y<3; y++) z= ( (* (p+y) <x) ? *(p+y) :x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2
考题
以下程序执行后的输出结果是( )。include usingnamespacestd;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<<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.不确定
考题
若有以下程序段;includeusing namespace std;int main(){ int a[]={1,4,5}; int *p=a[0],x=6,y,z; for(y=0;y<3;y++) z=((*(p+y)<x) ? *(p+y):x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2
考题
以下程序执行后的输出结果是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.不确定
考题
以下程序执行后的输出结果是()。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.不确定
热门标签
最新试卷