首页
题库
网课
在线模考
桌面端
登录
搜标题
搜题干
搜选项
0
/ 200字
搜索
填空题
阅读下面程序:
#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
点击查看答案
在线练习
手机看题
你可能感兴趣的试题
填空题
设一棵完全二叉树共有700个结点,则在该二叉树中有
【1】
个叶子结点。
答案:
350
点击查看答案
手机看题
填空题
算法复杂度主要包括时间复杂度和
【2】
复杂度。
答案:
空间
点击查看答案
手机看题
填空题
数据库管理系统常见的数据模型有层次模型、网状模型和
【3】
三种。
答案:
关系模型
点击查看答案
手机看题
填空题
软件工程包括三个要素,分别为方法、工具和
【4】
。
答案:
过程
点击查看答案
手机看题
填空题
一棵二叉树第六层(根结点为第一层)的结点数最多为
【5】
。
答案:
32
点击查看答案
手机看题
填空题
表达式x=operator-(y,z)可以表示为
【6】
。
答案:
x=y-2
点击查看答案
手机看题
填空题
指针变量所保存的不是一般的数据值,而是程序中另一个对象的
【10】
。
答案:
内存地址
点击查看答案
手机看题
填空题
在C++中,若需要在程序文件中进行标准输入输出操作,则必须在开始处加入预处理命令#include<iostream.h>,若使用到数学库中的函数时,要在源程序的开始处加入预处理命令
【8】
。
答案:
#include
点击查看答案
手机看题
填空题
假定用户没有给一个名为MyClass的类定义析构函数,则系统为其定义的默认析构函数首部形式为
【7】
。
答案:
~MyClass()
点击查看答案
手机看题
填空题
重载的关系运算符和逻辑运算符的返回类型应当是
【9】
。
答案:
bool
点击查看答案
手机看题
填空题
下列程序的输出结果为2,请将程序补充完整。
using namespace std;
class Base
public:
【12】
void fun() cout<<1;
;
class Derived:public Base
public:
void fun() cout<<2;
int main()
Base*p=new Derived;
p->fun();
delete p;
return 0’;
答案:
virtual
点击查看答案
手机看题
填空题
假设血int a=1,b=2;,则表达式(++a/b)*b--的值为
【11】
。
答案:
B
点击查看答案
手机看题
填空题
在MyClass类的定义中,对赋值运算符:进行重载。请将画线处缺失的部分补充完整。
【13】
MyClass::operator=(const MyClass& rhs)
if (this==&rhs) return *this;
value = rhs.value;
return *this;
答案:
MyClass&
点击查看答案
手机看题
填空题
下列程序运行后的输出结果是
【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;
答案:
6,6,6
点击查看答案
手机看题
填空题
阅读下面程序:
#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
点击查看答案
手机看题
微信扫码免费搜题