填空题

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

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

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


void main()

int m(1);
f(m),

则该程序的输出结果是 【14】 。

【参考答案】

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

填空题
下列程序运行后的输出结果是 【15】 。 #include<iostream.h> void fun(int,int,int *); void main() int x,y,z; fun(5,6,&x); fun(7,x,&y); fun(x,y,&z); cout<<x<< , <<y<< , <<z<<endl; void fun(int a,int b,int *c) b+=a; *c=b-a;
填空题
在MyClass类的定义中,对赋值运算符:进行重载。请将画线处缺失的部分补充完整。 【13】 MyClass::operator=(const MyClass& rhs) if (this==&rhs) return *this; value = rhs.value; return *this;
相关试题
  • 以下程序中,while循环的循环次数是( )...
  • 在E-R图中,用来表示实体的图形是( )。
  • 为用户与数据库系统提供接口的语言是( )。
  • 对虚函数的调用( )。
  • 串的长度是( )。