填空题

阅读下面程序:
#include<iostream.h>
void fun(int n)

int x(5);
static int y(10);
if(n>0)

++x;
++y;
cout<<x<<","<<y<<end1;


void main()

int m(1);
fun(m);

则该程序的输出结果是______。

【参考答案】

6,11
<上一题 目录 下一题>
热门 试题

填空题
下列程序的输出结果是______。 #include<iostream.h> #include<string.h> using namespace std; void fun(const char*s,char &C) c=s[strlen(s) 2]; int main() char str[]= ABCDE ; char ch=str[1]; fun(str,ch); cout<<ch; return 0;
填空题
下列程序的输出结果为: Object id=0 Object id=1 请将程序补充完整。 #include<iostream> using namespace std; class Point public: Point(int xx=0,int yy=0)X=xx;Y=yy;countP++; ~Point()countP--; int GetX()return X; int GetY()return Y; static void GetC()cout<< 0bject id= <<countP<<end1; private: int X,Y; static int countP; ; ______ 静态数据成员的初始化 int main() Point::GetC(); Point A(4,5); A.GetC(); return 0;
相关试题
  • 有如下类声明: class MyClass int i;...