首页
题库
网课
在线模考
桌面端
登录
搜标题
搜题干
搜选项
0
/ 200字
搜索
填空题
C++语言中表示双精度浮点数的关键字是【 】。
答案:
double
点击查看答案解析
在线练习
手机看题
你可能感兴趣的试题
填空题
下列程序的执行结果为【 】。 #include<iostream.h> void main( ) { cout.fill( ’’ * ’’ ); cout.width(10); cout<<"hello"<<endl; =
答案:
* * * * * hello
点击查看答案解析
手机看题
填空题
为解决在多重继承环境中因公共基类带来的【 】问题,C++语言提供了虚基类机制。
答案:
二义性
点击查看答案解析
手机看题
填空题
以下程序运行后的输出结果是_________。 #include
main() { char ch[]="abc",x[3][4]; int i; for(i=0;i<3;i++) strcpy(x[i],ch); for(i=0;i<3;i++) printf("%s",&x[i][i]); printf("\n"); }
答案:
abcbcc
点击查看答案解析
手机看题
填空题
将以下程序写成三目运算表达式是【 】。 if(a > B) max=a; else max=b;
答案:
max=(a>B) a:b;
点击查看答案解析
手机看题
填空题
C++语言的基本控制结构为顺序结构、选择结构和【 】。
答案:
循环结构
点击查看答案解析
手机看题
填空题
开发一个C++语言程序的步骤通常包括编辑、【 】、链接、运行和调试。
答案:
编译
点击查看答案解析
手机看题
填空题
在C++语言中,访问一个对象的成员所用的运算符是【 】,访问一个指针所指向的对象的成员所用的运算符是【 】。
答案:
成员选择运算符(或".")
点击查看答案解析
手机看题
填空题
以下程序运行后的输出结果是【 】。 #include<iostream.h> void fun(int x,int y) { x=x+y;y=x-y;x=x-y; cout<< x << "," <<y << " ,";= void main( ) { int x=2,y=3;fun(x,y); cout<< x << "," << y << endl;=
答案:
3,2,2,3
点击查看答案解析
手机看题
填空题
类模板的使用实际上是将类模板实例化成一个具体的【 】。
答案:
类
点击查看答案解析
手机看题
填空题
下面程序的输出结果是【 】。 #include<iostream.h> void main( ) { int a[6]={1,2,3,4,5,6}; for(int i=0;i<5;i++) cout<<a[i]<<""; cout<<endl; =
答案:
1 2 3 4 5
点击查看答案解析
手机看题
填空题
若已知a=10,b=20,则表达式l a < b的值为【 】。
答案:
A
点击查看答案解析
手机看题
填空题
表达式x.operator+(y.operator++(0) )还可以写成【 】。
答案:
x+y++或x+(y++)
点击查看答案解析
手机看题
填空题
以下程序的执行结果为【 】。 #include<iostream> using namespace std; class base { public: virtual void who( ) { cout < < "base class" < <end1; }; class derivel:public base { public: void who( ) { cout < <"derivel class" < <end1; }; } class derive2:public base { public: void who( ) { cout< <"derive2 class"< <end1; } }; void main( ) { base obj1,* p; derivel obi2; derive2 obj3; p=&obj1; p->who( ); p=&obj2; p->who( ); p=&obj3; p->who( ); }
答案:
base class derivel class derive2 class
点击查看答案解析
手机看题
填空题
请按下面注释的提示,将类B的构造函数定义补充完整。 C1assA { int a; public: A(int aa=O){a=aa;} }; class B:public A { int b; A c; public: //用aa初始化基类A,用aa+1初始化类对象成员c B(int aa}:【 】{b=aa+2} };
答案:
A(Aa),c(aa+A)或c(aa+A),A(aA)
点击查看答案解析
手机看题
填空题
C++语言中表示双精度浮点数的关键字是【 】。
答案:
double
点击查看答案解析
手机看题
填空题
以下程序中函数 fun 的功能是:构成一个如图所示的带头结点的单向链表,在结点 的数据域中放入了具有两个字符的字符串。函数 disp 的功能是显示输出该单向链表 中所有结点中的字符串。请填空完成函数 disp。 head ab cd ef \0 #include
typedef struct node /*链表结点结构*/ { char sub[3]; struct node *next; }Node; Node fun(char s) /* 建立链表*/ { …… } void disp(Node *h) { Node *p; p=h->next; while(= _______ ) { printf("%s\n",p->sub);p= _______ ; } } main() { Node *hd; hd=fun(); disp(hd);printf("\n"); }
答案:
p!=NULL 或 p 或 p!=0 或 p!=’\0’ , p->next 或 ...
点击查看答案解析
手机看题
填空题
若要在C盘根目录下作为二进制文件打开文件test.dat,则应该用的语句是【 】。
答案:
ifstream fin("C:\test.dat",ios_binary);或ifstream fin;fin.ope...
点击查看答案解析
手机看题
填空题
请定义一个函数名为A,返回值为int,没有参数的纯虚函数的定义是【 】。
答案:
virtual int A( )=0;
点击查看答案解析
手机看题
填空题
问题处理方案的正确而完整的描述称为_________。
答案:
算法
点击查看答案解析
手机看题
填空题
下面程序的运行结果为【 】。 # include <iostream.h> void fun(int x=0,int y=0) { cout << X << y; = void main( ) { fun(5); }
答案:
50
点击查看答案解析
手机看题
微信扫码免费搜题