网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列函数的运行结果是()。includeintf(int a, int b){ int c;if(a>b)c=1;elseif(a==
下列函数的运行结果是( )。 #include<iostream.h> intf( int a, int b) { int c; if(a>b) c=1; elseif(a==b)C=0; elsec=-1; return(c);} void main() {int i=2,j=3; int p=f(i,j); cout<<p;}
A.-1
B.1
C.2
D.编译出错,无法运行
参考答案
更多 “ 下列函数的运行结果是()。includeintf(int a, int b){ int c;if(a>b)c=1;elseif(a== 下列函数的运行结果是( )。 #include<iostream.h> intf( int a, int b) { int c; if(a>b) c=1; elseif(a==b)C=0; elsec=-1; return(c);} void main() {int i=2,j=3; int p=f(i,j); cout<<p;}A.-1B.1C.2D.编译出错,无法运行 ” 相关考题
考题
下面程序的运行结果是includevoid fun(int * a,int * b){ int x= * a; * a = * b;*
下面程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int x= * a; * a = * b; * b=x; cout <<*a<< *b<<""; } void main( 0 { int x =1,y =2; fun(x,y); cout<< x << y <<end1; }A.12 12B.12 21C.21 12D.21 21
考题
下列程序的运行结果是()。includevoid fun (int *a,int*b){int*kk=a;a=b;b=k}void
下列程序的运行结果是( )。 #include< iostream.h> void fun (int *a,int*b) {int*k k=a;a=b;b=k} void main() {int a=2004, b=9,*x=a,*y=b; fun(x, y) ; cout<<a<<" "<<b<<endl:}A.20049B.92004C.0D.编译时出错
考题
下面程序的运行结果是 include void fun(int * a,int * b) { int x= * a; * a= *
下面程序的运行结果是#include<iostream.h>void fun(int * a,int * b){int x= * a;* a= * b; * b=X;cout < < * a < < * b < <" ";}void main( ){int x=1,y=2;fun(x,y) ;cout < < X < < y < < endl;}A.12 12B.12 21C.21 12D.21 21
考题
有以下程序:includeusing namespace std;int f(int,int);int main(){ int i:1,x; x=f
有以下程序: #include<iostream> using namespace std; int f(int,int); int main() { int i:1,x; x=f(i,i+1); cout<<x<<end1; return 0; } int f(int a,int b) { int c; c = a; if(a>b) c = 1; else if(a==b) c = 0; else c = -2; return c; } 运行后的输出结果是( )。A.1B.0C.-1D.-2
考题
下列程序的运行结果是includevoid fun(int * a,int * b){int * k; k=a; a=b; b=k;}
下列程序的运行结果是 #include<iostream.h> void fun(int * a,int * b) { int * k; k=a; a=b; b=k; } void main( ) { int a=3,b=6, * x=a, * y=b; fun(x, y) ; cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.0 0
考题
下列程序的运行结果是()。includevoid fun(int *a, int *b) {int *k; k=a; a=b; b=
下列程序的运行结果是( )。#include<iostream.h>void fun(int *a, int *b) {int *k; k=a; a=b; b=k;}void main(){int a=2OO4,b=9,*x=a,*y=b;fun(x, y);cout<<a<<" "<<b<<end1;}A.20049B.92004C.0D.编译时出错
考题
以下程序的正确运行结果是()。includeint f(int);void main(){int a=2,i;for(i=0;i
以下程序的正确运行结果是( )。 #include<iostream.h> int f(int); void main() { int a=2,i; for(i=0;i<3;i++)cout<<f(a)<<" "; cout<<endl; } int f(int a) { int b=0; static int c=3; b++;c++; return(a+b+c); }A.777B.7 10 13C.7 9 11D.7 8 9
考题
下列程序的运行结果是 inClude roid fun(int *a,int * b) { int * k; k=a;a=b
下列程序的运行结果是 #inClude<iostream.h> roid fun(int *a,int * b) { int * k; k=a;a=b;b=k;} void main( ) { int a=2004,b=9,* x=a,* y=b; fun(x,y); cout < < a < <" " < < b < < end1;}A.2004 9B.9 2004C.0 0D.编译时出错
考题
下列程序的运行结果是includevoid fun(int *a,int *B){int *k;k=a;a=b;b=k;}void m
下列程序的运行结果是 #include<iostream.h> void fun(int *a,int *B) {int *k; k=a;a=b;b=k; } void main( ) {int a=3,b=6,*x=a,*y=b; fun(x,y); cout << a <<" "<< b; }A.63B.36C.编译出错D.0
考题
下列程序的运行结果是includevoid fun(int*a,int*b){int*k; k=a;a=b;b=k;}void mai
下列程序的运行结果是 #include<iostream.h> void fun(int*a,int*b) { int*k; k=a;a=b;b=k; } void main() { int a=3,b=6,*x=a,*y=b; fun(x,y); cout < < a < < " " < < b; }A.6 3B.3 6C.编译出错D.O 0
热门标签
最新试卷