C++题库
提供C++相关考试试题、历年真题、模拟试题和答案解析,支持在线查看与练习。
科目:
全部
最新收录试题
单选题
C++
需求分析阶段的任务是确定( )。
2013-08-06
收藏 0 次
单选题
C++
设计程序时,应采纳的原则之一是( )。
2013-08-06
收藏 1 次
简答题
C++
使用VC++6.0打开考生文件夹下的源程序文件3.cpp,要求编写一个CMyShape类,含有求面积、周长等的纯虚函数,然后编写一个CRectangle类和CCircle类继承CM
2013-08-06
收藏 1 次
简答题
C++
使用VC++6.0打开考生文件夹下的源程序文件2.cpp。阅读下列函数说明和代码,补充空出的代码。函数sum(intn)用于计算在n范围内,能被7和11整除的所有整数的和(包括n在
2013-08-06
收藏 1 次
简答题
C++
使用VC++6.0打开考生文件夹下的源程序文件1.cpp,该程序运行时有错,请改正程序中的错误,使程序输出的结果为
Number=7
Number=12
注意:错误的语句在//*
2013-08-06
收藏 1 次
单选题
C++
下列程序的运行结果是( )。
#include<iostream.h>
intx=5;
intfun(inta)
{
intc:
c=X*a:
retur
2013-08-06
收藏 2 次
单选题
C++
有以下程序:
#include<iostream>
usingnamespacestd;
classA{
public:
A(){cout<<"A"
2013-08-06
收藏 1 次
单选题
C++
对于语句“cout<<setfill('*')<<setw(10)<<1<<serfill('*')<<setw(2)
2013-08-06
收藏 0 次
单选题
C++
若已定义
inta[]={1,2,3,4,5,6,7,8,9,10},p=a,i=5;
则对数组元素不正确的引用是( )。
2013-08-06
收藏 1 次
单选题
C++
有下列程序:
#include<stdi0.h>
voidmain()
{char*a[]={"abcd","ef","gh","ijk");inti;
for
2013-08-06
收藏 2 次
单选题
C++
有如下类声明:
classXA(
intX;
public:
XA(intn){x=n;}
};
classXB:publicXA{
inty;
public:
XB
2013-08-06
收藏 0 次
单选题
C++
以下程序的输出结果是( )。min( )
{
inti=0,a=0;
while(i<20)
{
for(;;)
{
if((i%10)==0)break;
els
2013-08-06
收藏 0 次
单选题
C++
下面程序的运行结果为( )。#include<iostream.h>
voidswap(int&a,intb)
{
inttemp;
temp=a++;
a=b
2013-08-06
收藏 0 次
单选题
C++
下列程序的运行结果为( )。
#include<iostream.h>
template<classTT>
classFF
{TTa1,a2,a3;
2013-08-06
收藏 0 次
单选题
C++
下面程序的运行结果是( )。
#include<iostream.h>
classbase{
protected:
inta;
public:
base()
2013-08-06
收藏 0 次
单选题
C++
有如下程序:
#included<iostream>
usingnamespacestd;
classTestClass
{
private:
intx,Y;
2013-08-06
收藏 0 次
单选题
C++
下列程序的输出结果是( )。
#included<iostream>
usingnamespacestd;
intmain()
{
chara[]="Hell0
2013-08-06
收藏 0 次
单选题
C++
若有以下程序:
#include<iostream>
usingnamespacestd;
classBase
{public:
Base()
{x=0;}
2013-08-06
收藏 0 次
单选题
C++
有如下程序:
#inelude<iostream>
usingnamespacestd;
classTest
{
public:
Test(){n+=2;}
~
2013-08-06
收藏 0 次
单选题
C++
下面程序的运行结果为( )。
#include<iostream.h>
voidmain()
{
chara='3':
switch(a)
{
case'3'
2013-08-06
收藏 0 次