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

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

若有如下程序: sub(int a,int b,int c) { c=a+b; return(c);} main() {int x=3,y=4,z=6; sub(x,y,z); printf('%d”,z); } 则程序运行后的输出结果是( )。

A.3

B.6

C.7

D.4


参考答案

更多 “ 若有如下程序: sub(int a,int b,int c) { c=a+b; return(c);} main() {int x=3,y=4,z=6; sub(x,y,z); printf('%d”,z); } 则程序运行后的输出结果是( )。A.3B.6C.7D.4 ” 相关考题
考题 若有以下程序段: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.不确定

考题 下列程序运行时的输出结果是______。 include using namespace std; void Xfun(intvoid Xfun(int, int);int main(){int a=3, b=4;Xfun(a, B) ;cout<<a*a+b<<end1;return 0;}void Xfun(int x, int y){int z=x;x=y; y=z;}

考题 设函数findbig已定义为求3个数中的最大值。以下程序将利用函数指针调用findbig函数,请填空。main(){ int findbig(int,int,int); int (*f)(),x,y,z,big; f=; scanf("%d%d%d",x,y,z); big=(*f)(x,y,z); printf("big=%d\n",big);}

考题 若有以下程序段;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.不确定

考题 下列程序运行后的输出结果是()。includevoid fun(int,int,int*);void main(){int x, 下列程序运行后的输出结果是( )。 #include<iostream.h> void fun(int,int,int*); void main() { int x,y,z; fun(5,6,x); fun(7,x,y); fun(x,y,z); cout<<x<<","<<y<<","<<z<<endl; } void fun(int a,int b,int *c) { b+=a; *c=b-a; }A.5,5,5B.6,6,6C.5,6,7D.7,7,7

考题 以下程序执行后的输出结果是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.不确定

考题 以下程序执行后的输出结果是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.不确定