下面程序的运行结果是【】。 include using namespace std; class count{ static int n; 下面程序的运行结果是【 】。include <iostream>using namespace std;class count{static int n;public:count(){n++;}static int test(){for(int i=0;i<4;i++)n++;return n;}};int count::n = O;int main(){cout<<count:: test()<<" ";count c1, c2;cout<<count:: test()<<endl;return 0;}

下面程序的运行结果是【】。 include using namespace std; class count{ static int n;

下面程序的运行结果是【 】。

include <iostream>

using namespace std;

class count

{

static int n;

public:

count()

{

n++;

}

static int test()

{

for(int i=0;i<4;i++)

n++;

return n;

}

};

int count::n = O;

int main()

{

cout<<count:: test()<<" ";

count c1, c2;

cout<<count:: test()<<endl;

return 0;

}


相关考题:

下面程序的运行结果是【】。 inChlde using namespace std; class count { static int n; 下面程序的运行结果是【 】。inChlde<iOStream>using namespace std;class count{static int n;public:count(){n++;}static int test(){for(int i=0:i<4;i++)n++;return n;}};int count::n=0;int main(){cout<<COUnt::test()<<" ";count c1, c2;cout<<count::test()<<end1;return 0;}

下面程序的运行结果是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

下面程序的运行结果是 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

下面程序运行输出的结果是【】。 include using namespace std; int main(){char a[]="C 下面程序运行输出的结果是【 】。include <iostream>using namespace std;int main(){char a[]="Chinese";a[3]='\0';cout<<a<<endl;return 0;}

下面程序的运行结果是( )。include main(){int a=25; fun(A); }fun(int *x){ print 下面程序的运行结果是( )。include<stdio.h>main(){int a=25;fun(A);}fun(int *x){ printf("%d\n",++*x);}

下面程序的运行结果是 ______。 include void main() { char str[]="SSSWLIA",c; int 下面程序的运行结果是 ______。include<iostream.h>void main(){char str[]="SSSWLIA",c;int k;for(k=2;(c=str[k]!='\0';k++){switch(c){case'I':++k;break;case'l';continue;default;c

下面程序的运行结果是include int fun ( int a[ ],int n){int result=1;for(int 下面程序的运行结果是 #include < iostream.h > int fun ( int a[ ],int n) { int result=1; for(int i=1;i<n;i++) result=result*a[i]; return result; } void main( ) { int a[3]={3,4,5}; cout << fun(a,A.12B.15C.20D.60

下面程序的运行结果是includevoid fun(int*a,int*b){int X= *a;* a= *b;*b=X;cout 下面程序的运行结果是 #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<<end1; }A.12 12B.12 21C.21 12D.21 11

【填空题】下面程序的运行结果是 。 #include<stdio.h> main() {int a,s,n,count; a=2;s=0;n=1;count=1; while(count<=7) {n=n*a;s=s+n;++count;} printf("s=%dn",s); }