#include
int fun(int a[]. int n)
{
int result=l:
for(int i=1;i
result=result*a[i];
return result;
}
void main()
{
int a[3]={3,4,5};
cout<<
}
A.12;
B.15;
C.20;
D.60
[单选题]下面程序的输出结果是#includeclass example{int a:public:example(intB.{a=n++;}void print(){a=a+1;cout < < a < <” ”;}void print()const{cout<<<;}}void main(){example x t(3);const example y(2);x.print();y.print();}A.2 2B.4 3C.4 2D.3 2
[单选题]下列程序的运行结果是#includeclass A{int a;public:A.(){a=0;}A.(int as){a=as;cout<}};void main(){A.x,y(2),z(3);cout<}A.1B.2C.3D.4
[单选题]下列程序的运行结果是()。 include class A { inta; public: A(){a=0:} A(int aa) {下列程序的运行结果是( )。 #include<iostream.h> class A { inta; public: A(){a=0:} A(int aa) { a=aa; cout<<a++; } }; void main() { A x,y(2),z(3); cout<<endl; }A.0B.23C.34D.25
[单选题]以下程序的输出结果是 voidreverse(inta[],intn) {inti,t; for(i=0;i{t=a[i];a[i]=a[n£以下程序的输出结果是void reverse(int a[],int n){ int i,t;for(i=0;i A.22B.10C.34D.30
[单选题]下面程序的运行结果是 ( ) include include main( ) { char * a="下面程序的运行结果是 ( ) # include<stdio.h> # include<string.h> main( ) { char * a="AbcdEf",* b="aBcD" a + +;b + +; printf("%d/n",strcmp(a,b)); }A.0B.负数C.正数D.无确定值
[单选题]下面程序的运行结果是()。includeintfun(inta[],int n){int result=1;for(int i=“i<下面程序的运行结果是( )。 #include<iostream.h> intfun(inta[],int n) { int result=1; for(int i=“i<n;i++) result’resultxa[i]; return result; } void main() { inta[3]={3,4,5}; cout<<fun(a,3)<<endl;
[单选题]下面程序的运行结果是#includeclass base{protected:int a;public:base(){ cout <<”0”;}class basel:virtual base}public:base 1(){cout <<”1”;}};class base2:virtual base{public:base2(){cout <<”2”;(};class derived:public base1,public base2{public:deri
[单选题]下面程序的运行结果是#includevoid main(){int num=1;int &ref=num:ref=ref+2;cout<(num;num=num+3;cout<<}A.13B.16C.36D.33
[单选题]下面程序的运行结果是includeint fun(inta[],int n){ int result=1; for(int i=1:i下面程序的运行结果是 #include<iostream.h> int fun(inta[],int n) { int result=1; for(int i=1:i<n;i++) result=result*a[i]; remm result; } void main() { int a[3]={3,4,5}; cout <<fun(a,3) <<end1; }
[单选题]下列程序的输出结果是#includeint min(int a,int B){if(aelse return B;return 0;}void main(){cout<<}A.0B.1C.2D.3