-
以下程序的输出结果是( ) #include iostream.h #include string.h void main() { char *p[10]={abc,aabdfg,dcdbe,abbd,cd}; cout<
-
以下程序的输出结果是()。include <iostream.h>void main(){int a=0,i;for(i=1 ;i<5;i++){ switc
以下程序的输出结果是()。include <iostream.h>void main(){ int a=0,i; for(i=1 ;i<5;i++) { switch(i) { case 0: case 3: a+ =2; case 1: case 2: a+ =3; default: a+ =5; } } cout<<a<<end1; return;}
A.31
B.13
C.10
D.20
-
下面程序的运行结果是include<iostream.h>void main(){int num=1;int &ref=num;ref=ref+2;c
下面程序的运行结果是 include<iostream.h> void main() { int num=1; int &ref=num; ref=ref+2; cout<<num; num=num+3; cout<<ref<<end1; }
A.13
B.16
C.36
D.33
-
下列程序的输出结果是inClUde<iostream.h>iht b=2;int funC (int*a) { b+=*a;return(b);}void m
下列程序的输出结果是 inClUde<iostream.h> iht b=2; int funC (int*a) { b+=*a;return(b);} void main() { inta=2,res=2; res+=func(&a); cout<<res;}
A.4
B.6
C.8
D.10
-
下列程序的运行结果为 include<iostream.h>void print(double a){cout<<++a;} void print(int a
下列程序的运行结果为 include<iostream.h> void print(double a) { cout<<++a; } void print(int a,int b) { cout<<b<<a; } Void main() { print(1.2); cout<<" "; print(3,4); }
A.1.2 34
B.2.2 34
C.1.2 43
D.2.2 43
-
下面程序的运行结果为#include<iostream.h>void main( )char a='3';switch(
A.
 
-
以下程序段的输出结果是[ ]。 include<iostream.h> void ref(int &i); void main(){int val=1
以下程序段的输出结果是 [ ] 。
include<iostream.h>
void ref(int &i);
void main(){
int val=1;
cout<<“旧值:”<<val<<end1;
ref(val);
cout<<”新值:”<<val<<end1;
}
void ref(int &i){i=10;}
-
下面程序的运行结果是()。include<iostream.h> void main{int num=1:int&ref=num; ref
下面程序的运行结果是()。
include<iostream.h> void main
{
int num=1:
int&ref=num; ref=ref+2:
cout<<num: num=num+3: cout<<ref<<endl:
}
A.13
B.16
C.36
D.33
-
下面程序的运行结果是()。 include<iostream.h> void fun(int *a,int *B. { int x=*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 12
B.12 21
C.21 12
D.21 21
-
下列程序的运行结果为include < iostream.h >void main(){ int a=2; int b=a+l; cout < < a/b
下列程序的运行结果为 include < iostream.h > void main() { int a=2; int b=a+l; cout < < a/b < < end1; }
A.0.66667
B.0
C.0.7
D.0.66666666…
-
有以下程序include<iostream,h>int i=0;void fun(){{ Static int i=1 Std::cont<<i++<<','; } S
有以下程序 include<iostream,h> int i=0; void fun() { { Static int i=1 Std::cont<<i++<<','; } Std::cout<<i<<','; } int main() { fun();fun(); return 0; } 程序执行后的输出结果是()。
A.1,2,1,2,
B.1,2,2,3,
C.2,0,3,0,
D.1,0,2,0,
-
Tilil程序的运行结果是()。 include<iostream.h> void main { int i=1: while(i<=8)
Tilil程序的运行结果是()。 include<iostream.h> void main { int i=1: while(i<=8) if(i%3 1=2)continue: else eout<<i; }
A.25
B.36
C.258
D.369
-
阅读以下程序,写出程序运行后的输出结果是 ______。include<iostream.h>void main(){char a[]={'
阅读以下程序,写出程序运行后的输出结果是 ______。 include<iostream.h> void main(){ char a[]={'H','e','1','1','o','\0'}; int i,j; i=sizeof(a)/sizeof(char); j=strlen(a) cout<<i<<‘ ’<<j;
A.6 6
B.5 6
C.1 5
D.6 5
-
以下程序的输出结果是 ______。include<iostream.h>void main() {char w[][10]={ "ABC", "DEFGH"
以下程序的输出结果是 ______。 include<iostream.h> void main() { char w[][10]={ "ABC", "DEFGH", "IJKL" , "MNOP" }; int k; for (k=1 ;k<3 ;k++) cout<<w[k]<< " " }
A.ABC FGH KL
B.ABC EFG IJ M
C.EFG JK 0
D.DEFGH IJKL
-
下列程序的输出结果为()。 include<iostream.h> void main { char*a[]={”hell0”,”the”,”
下列程序的输出结果为()。 include<iostream.h> void main { char*a[]={”hell0”,”the”,”world”}; char** pa = a: pa++; cout<<*pa<<endl: }
A.hello
B.the
C.world
D.hellotheworld
-
有以下程序:include<iostream.h>void main(){ int x=5,y=2; cout<<!(y==x/2)<<","; cout<<y!=x%
有以下程序: include<iostream.h> void main() { int x=5,y=2; cout<<!(y==x/2)<<","; cout<<y!=x%3)<<","; cout<<(x>0&&y<0)<<","; cout<<(x!=y‖x>=y)<<endl: } 程序执行后的输出结果是()
A.0,0,0,1
B.1,1,1 1
C.0,0, 1,1
D.1,1,0,0
-
若有如下语句 include<iostream.h>void main(){int x=3;do{x=x-2cout<<x;{while (!(- -x);}则上
若有如下语句 include<iostream.h> void main() { int x=3; do{ x=x-2 cout<<x; {while (! (- -x); } 则上面程序段()
A.输出的是1
B.输出的是1和一2
C.输出的是3和0
D.是死循环
-
下列程序的输出结果是()。include< iostream.h> void main(){double d=3.2;intx,y:x=1.2;y=(x+3.
下列程序的输出结果是()。 include< iostream.h> void main() {double d=3.2; intx, y: x=1.2; y=(x+3.8)/5.0 cout<<y*d <<endl;}
A.3
B.3.2
C.0
D.3.07
-
下面程序的运行结果是include<iostream.h>void main(){int i=1;while(i<=8)if (i%3!=2)cont
下面程序的运行结果是 include<iostream.h> void main() { int i=1; while(i<=8) if (i%3!=2)continue; else cout<<i; }
A.25
B.36
C.258
D.369
-
下列程序的运行结果为()。 include<iostream.h> void main { int a=2: int b=a+1: co
下列程序的运行结果为()。 include<iostream.h> void main { int a=2: int b=a+1: cout<<a/b<<endl:
A.0.66667
B.0
C.0.7
D.0.66666666…
-
若运行时给变量x输入12,则以下程序的运行结果是include <iostream.h>void main(){ int x,y; cin
若运行时给变量x输入12,则以下程序的运行结果是 include <iostream.h> void main() { int x,y; cin>>x; y=x>12? x+10:x-12; cout<<y; cout<<endl; }
A.0
B.22
C.12
D.10
-
include<iostream.h> void main() { int n=9; while(n>6) { n--; cout < < n;} } 该程
include<iostream.h> void main() { int n=9; while(n>6) { n--; cout < < n;} } 该程序的输出结果是
A.987
B.876
C.8765
D.9876
-
下列程序的运行结果为include<iostream.h>int i=0;class A{public: A(){i++;}};void main(){
下列程序的运行结果为 include<iostream.h> int i=0; class A{ public: A(){i++;} }; void main() { A a,b[3] ,*c; c=b; cout << i << end1; }
A.2
B.3
C.4
D.5
-
下面程序段的运行结果是 include<iostream.h> void main() {char*s="abcde"; S+=2;
下面程序段的运行结果是 include<iostream.h> void main() { char*s="abcde"; S+=2; cout<<&s;}
A.cde
B.字符'c'
C.字符'c'的地址
D.无确定的输出结果