单选题在下列字符中,不允许作为C++标识符的是( )。
单选题以下选项中不属于软件工程的目标是( )。
单选题有以下程序 #include <iostream> using namespace std; int a; int fun(); int main() extern int a; int b; a=100; b=fun(); cout<<b<<endl; return 0; int fun() extern int a: return (10*a); 其程序运行后的输出结果是( )。 A.100 B.10 C.1000 D.10000
单选题设int x[ ]={2,4,6,8},y,*p=&x[1];则执行语句y=(*--p)++;后数组元素x[0]的值为 ______。
单选题有如下类定义:
class AA
{
im a:
public:
int getRef()const{return&a;}//①
int getValue()const{return a;}//②
void set(int n)const{a=n;}//③
friend void show(AA aA.const{cout<
单选题下列选项中,作为是数据库系统的核心的是( )。
单选题若x和y是程序中的两个整型变量,则下列if语句中正确的是( )。
单选题构成计算机软件的是( )。
单选题以下关键字不能用来声明类的访问权限的是______。
单选题关于this指针的说法不正确的是( )。 A) 不能在程序中修改this指针 B) this指针可以给其他指针赋值,但不能修改this指针 C) 静态成员函数中没有this指针 D) this指针可以被赋值
单选题如果表达式y*x++中,“*”是作为成员函数重载的运算符,“++”是作为友元函数重载的运算符,采用运算符函数调用格式,该表达式还可表示为 A) x.operator++(0).operator*(y); B) operator*(x.operator++(0),y); C) y.operator*(operator++(x,0)) D) operator*(operator++(x,0),y)
单选题已知char a; int b; float c; double d; 则表达式a*b+c-d结果为
A. double
B. int
C. float
D. char
单选题以下函数值的类型是 fun(float x)
{float y; y=3*x-4; return
y; }
A. int
B. 不确定
C. void
D. float
单选题有如下程序
#include
#include
using namespace std;
int main(){
count<
单选题假定Myclass为一个类,则执行Myclass a[4],*p[2];语句时,自动调用该类的构造函数 ( )次。
单选题有以下程序: #included<iostream> using namespace std; class MyClass public: MyClass(int n)number=n; //拷贝构造函数 MyClass(MyClass& other) number=other.number; ~MyClass() private: int number; ; MyClass fun(MyClass p) MyClass temp(p); return temp; int main() MyClass obj1(10),obj2(0); MyClass obj3(obj1); obj2=fun(obj3); return 0; 程序执行时,MyClass类的拷贝构造函数被调用的次数是( )。
单选题下列属于大型数据库系统的是( )。
单选题设栈S的初始状态为空。元素a,b,c,d,e,f依次通过栈S,若出栈的顺序为b, d,c,f,e,a,则栈S的容量至少应该为
单选题有如下的程序:#include <cstring.h>#include <iostream. h>using namespace std;class MyString{ public: MyString(const char*s); ~MyString() { delete[]data; } protected: unsigned len; char*data;};MyString::MyString(const char *s){ len=strlen(s); data=new char[len+ 1]; strcpy(data, s);}int main(){ MyString a("C++ Programing"); MyString b(a); return0;}在运行上面的程序时出错,出错的原因是( )。
