单项选择题

有以下程序
#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,
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序 #include<iostream> using namespace std; int a; int fun(); int main() extern int a; int b; a=100; b=fun(); cout<<b<<endl; return 0; int fun() extern int a; return(10*a); 其程序运行后的输出结果是( )。
A.100
B.10
C.1000
D.10000
单项选择题
阅读以下程序: #include<iostream.h> class kk int m; public: static int n; kk() m=0; 1 void setvalue() m++; n++; void output() cout<< m= <<m<< ,n= <<n<<endl; ; int kk::n; void main() kk obj1,obj2; obi1.Setvalue(); obj1.output(); obj2.setValue(); Obj2.output(); 该程序的执行结果是( )。
A.m=1,n=1
B.m=l,n=l
m=1,n=1 m=1,n=2
C.m=1,n=1
D.m=1,n=1
m=2,n=1 m=2,n=2
相关试题
  • 以下程序的执行结果是 【15】 。 #in...
  • 下列程序的输出结果是 【14】 。 #in...
  • 创建对象数组时,对数组的每一个元素都将调...
  • 下列程序的输出结果是 【11】 。 #in...
  • 已知:double A(double A)return++a...