有以下程序: main( ) int f1 (int x, int y) { return x>y?x:y; } int f2 (int x, int y) { return x>y?y:x; } main( ) { int a=4,b=3,c=5,d,e,f; d=f1(a,b); d=f1(d,c); e=f2(a,b); e=f2(e,c); f=a+b+c-d-e; printf("%d,%d,%d\n",d,f,e); } 执行后输出的结果是
A.3,4,5
B.5,3,4
C.5,4,3
D.3,5,4
第1题:
以下程序的输出结果是#include "stdio.h"int *fun(int *a,int *b){ int m; m=*a; m+=*b-3; return(&m);}main(){ int x=21,y=35,*a=&x,*b=&y; int *k; k=fun(a,b); printf("%d\n",*k);}
第2题:
以下程序执行后的输出结果是 #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.18
B.9
C.10
D.不确定
第3题:
以下程序执行后的输出结果是 #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.18
B.9
C.10
D.不确定
第4题:
以下程序执行后的输出结果是 #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.18
B.9
C.10
D.不确定
第5题:
以下程序执行后的输出结果是( )。 #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.18
B.9
C.10
D.不确定
第6题:
下面能正确使用的语句是().
A.int*x;y=1;x=&y;
B.int*x;y;x=&y;
C.int*x;*x=1;
D.int*x,y=1;x=y;