首页
题库
网课
在线模考
桌面端
登录
搜标题
搜题干
搜选项
0
/ 200字
搜索
填空题
若有以下程序:
#include <iostream>
using namespace std;
int main()
char a;
a=’H’-’A’+’0’;
cout<<a<<end1;
return 0;
执行后输出的结果是
【6】
。
答案:
G
点击查看答案解析
在线练习
手机看题
你可能感兴趣的试题
填空题
在一个有n个元素的顺序表的第i个元素(1≤i≤n)之前插入一个新元素时,需要向后移动
【1】
个元素
答案:
n-i+1
点击查看答案解析
手机看题
填空题
在面向对象方法中,类之间共享属性和操作的机制称为
【2】
。
答案:
继承
点击查看答案解析
手机看题
填空题
源程序文档化要求程序应加注释。注释一般分为序言性注释和
【3】
。
答案:
功能性注释
点击查看答案解析
手机看题
填空题
强行排错法涉及的调试技术主要是
【4】
和监视表达式。
答案:
设置断点
点击查看答案解析
手机看题
填空题
数据库的设计通常可以分为这样4个步骤:需求分析、概念设计、
【5】
和物理设计。
答案:
逻辑设计
点击查看答案解析
手机看题
填空题
若有以下程序:
#include <iostream>
using namespace std;
int main()
char a;
a=’H’-’A’+’0’;
cout<<a<<end1;
return 0;
执行后输出的结果是
【6】
。
答案:
G
点击查看答案解析
手机看题
填空题
若有如下程序段:
#include <iostream>
using namespace std;
int main()
char *p="abcdefgh",*r;
long *q;
q=(long *)p;q++;
r=(char *)q;
cout<<r<<end1;
return 0;
该程序的输出结果是
【8】
。
答案:
efgh
点击查看答案解析
手机看题
填空题
以下程序的输出结果是
【9】
。
#include <iostream>
using namespace std;
void fun()
static int a=0;
a+=2;
cout<<a;
int main()
int CC;
for(CC=1;cc<4;CC++)
fun();
cout<<end1;
return 0;
答案:
246
点击查看答案解析
手机看题
填空题
假定用户没有给一个名为MyClass的类定义析构函数,则系统为其定义的默认析构函数首部形式为
【10】
。
答案:
~MyClass()
点击查看答案解析
手机看题
填空题
若二维数组b有m列,则在b[i][j]前的元素的个数为
【7】
。
答案:
i*m+j
点击查看答案解析
手机看题
填空题
对虚函数的调用有两种方式:
【11】
和
【12】
。
答案:
[11]非多态调用[12]多态调用
点击查看答案解析
手机看题
填空题
【13】
使一个函数可以定义成对许多不同数据类型完成同一个任务。
答案:
函数模板
点击查看答案解析
手机看题
填空题
若有以下程序:
#include <iostream>
using namespace std;
class Sample
private:
const int n;
public:
Sample(int i) :n(i) )
void print()
cout<<"n="<<n<<end1;
;
int main()
sample a(10);
a.print();
return 0;
上述程序运行后的输出结果是
【14】
。
答案:
n=10
点击查看答案解析
手机看题
填空题
有以下程序:
#include <iostream>
#include <fstream>
using namespace std;
int main()
ofstream ofile("D:\\test.txt");
if(!ofile)
cout<<"test.txt can’t open"<<end1;
return 0;
ofile<<"This book is C++"<<" "<<12345<<end1;
ofile.close();
ifstream ifile("D:\\test.txt");
if ( ! ifile)
cout<<"test.txt can’t open"<<end1;
return 0;
char str[80];
ifile>>str;
ifile.close();
cout<<str<<end1;
return 1;
程序执行后的输出结果是
【15】
。
答案:
This
点击查看答案解析
手机看题
微信扫码免费搜题