选择题 下面不是C++语言整型常量的是 。
选择题 在类声明中,紧跟在“public:”后声明的成员的访问权限是______。
选择题 若x和y是程序中的两个整型变量,则下列if语句中正确的是______。
选择题 能正确表示逻辑关系'a≥10或a≤0'的C++语言表达式是______。
选择题 对于语句const int x=10;的描述正确的是 。
选择题 下列关于纯虚函数与抽象类的描述中,错误的是______。
选择题 数据流程图(DFD图)是 。
选择题 两个或两个以上模块之间联系的紧密程度称为______。
选择题 有如下程序:
# include<iostrcam>
using namespace std;
int main(){
int f,f1=0,f2=1;
for(int i=3;i<=6;i++){
f=f1+f2;
f1=f2;f2=f;
}
cout<<f<<endl;
return 0;
}
运行时的输出结果是______。
选择题 在E-R图中,用来表示实体联系的图形是______。
选择题 下列有关模板的叙述中,正确的是______。
选择题 设有下列程序段:
char s[20]='Beijing',*p;
p=s;
则执行“p=s;”语句后,下列叙述正确的是 。
选择题 若有如下程序:
#include<iostream>
using namespace std;
int s=0;
class sample
{
static int n;
public:
sample(int i)
{
n=i;
}
static void add()
{
S+=n;
}
};
int sample::n=0;
int main()
{
sample a(2),b(5);
sample::add();
cout<<s<<endl;
return 0;
}
程序运行后的输出结果是 。
选择题 已知i=5,j=0,下列各式中运算结果为j=6的表达式是______。
选择题 在C++程序中,如果要求通过函数来实现一种简单的功能,并且要求尽可能加快程序执行速度,则应该选用______。
选择题 下列程序的运行结果为______。
#include<iostream. h>
void print(double a)
{
cout<<++a;
}
void print(int a, int b)
{
cout<<b<<a;
}
void main()
{
print(1. 2);
cout<<' ';
print(3, 4);
}
选择题 有如下程序
#include <iostream>
#include <iomanip>
using namespace std;
int main( ){
cout<<setprecision(3)<<fixed<<setfill('*')<<setw(8);
cout<<12.345<<__________<<34.567;
return 0;
}
若程序的输出是:
**12.345**34.567
则程序中下划线处遗漏的操作符是 。
选择题 有如下程序:
#include<iostream>
using namespace std;
int main()
{
void function(double val);
double val;
function(val);
cout<<val;
return 0;
}
void function(double val)
{
val= 3;
}
编译运行这个程序将出现的情况是 。
选择题 不合法的main函数命令行参数表示形式是______
选择题 有以下程序:
#include <iostream>
#include <fstream>
using namespace std;
int main ( )
{
ofstream ofile;
char ch;
ofile.open ('abc.txt');
cin>>ch;
while (ch!='#' )
{
cin>>ch;
ofile.put(ch);
}
ofile.close();
return 0;
}
当从键盘终端连续输入的字符为a、b、c和#时,文件abc.txt中的内容为 。