单选题有以下程序
#include
void fun(int a,int b,int c)
{ a=456,b=567,c=678;}
void main()
{
int x=10,y=20,z=30;
fun(x,y,z);
cout<<x<<','<<y<<','<<z<<endl;
}
输出结果是
单选题下列选项中不属于软件生命周期开发阶段任务的是( )。
单选题下列有关析构函数的调用顺序是( )。
单选题有如下程序:
#include<iostream>
using namespace std;
class AA{
int n;
public:
AA(int k):n(k){)
int get(){return n;}
int get()const{return n+1;}
};
int main()
{
AA a(5);
const AA b(6);
cout<<a.get()<<b.get();
return 0;
}
执行后的输出结果是______。
单选题下列关系运算中,能使经运算后得到的新关系中属性个数多于原来关系中属性个数的是
A. 选择
B. 连接
C. 投影
D. 并
单选题有以下程序#include <iostream>using namespace std;int a;int
fun ();int main (){ extern int a; int
b; a = 100; b = fun();
cout<<b<<end1; return 0;}int fun{){
extern int a; return (10*a ;}
其程序运行后的输出结果是
A. 100
B. 10
C. 1000
D. 10000
单选题下面叙述错误的是( )。 A.基类的protected成员在派生类中仍然是protected成员 B.基类的protected成员在public派生类中仍然是protected成员 C.基类的protected成员在private派生类中是pnvate成员 D.基类的protected成员不能被派生类的对象访问
单选题在一个派生类的成员函数中,试图调用其基类的成员函数"void f();'',但无法通过编译。这说明( )。
单选题数据库设计的根本目标是要解决 A) 数据共享问题 B) 数据安全问题 C) 大量数据存储问题 D) 简化数据维护
单选题下列字符串可以用作C++标识符的是______。
单选题以下函数实现的功能是
void fun(char*s)
{
char*p,*q,temp;
p=s;
q=s+strlen(s)-1;
while(p<q)
{
temp=*p;
*p=*q;
*p=temp;
p++;
q--;
}
}
单选题有以下程序: #include 〈iestream〉 using namespace std; int f(int n) if(n==1) return 1; else return f(n-1)+1; int main() int i,j=0; for(i=1;i j+=f(i); cout return 0; 上述程序运行后的输出结果是( )。
单选题有如下程序: #include<iostream> using namespace std; class BASE{ public: ~BASE(){cout<<''BASE'';} }; class DERiVED:public BASE{ public: ~DERIVED(){tout<<''DERiVED'';} }; int main(){DERIVED x;return 0;} 执行后的输出结果是( )。
单选题有下列程序:
#include <stdio.h>
#define PT 3.5;
#define S(x) PT*x*x;
votd main()
{ int a=1;b=2; prinif("%4.If/n",S(a+b));}
程序运行后的输出结果是______。
单选题有如下程序: #include<iostream.h> using namespace std; class Demo public: Demo() cout<<"default constructor/n"; Demo(const Demo &x)cont<<"copy constructor/n"; ; Demo userCode(Demo b)Demo c(b);return c; int main() Demo a;d; eout<<"calling userCode()/n"; d=userCode(a); return 0; 执行上面程序的过程中,构造函数Demo()和Demo(const Demo &x)被调用的次数分别是( )。
单选题下列字符串中不能作为C++标识符使用的是______。 A.INT B.test C._1481 D.1temp
单选题算法的时间复杂度是指( )。 A) 算法的长度 B) 执行算法所需要的时间 C) 算法中的指令条数 D) 算法执行过程中所需要的基本运算次数
单选题以下对C++语言函数的有关描述中,正确的是 A)在C++语言中调用函数时,只能把实参的值传给形参,形参的值不能传送给实参 B)C++语言函数既可以嵌套定义又可以递归调用 C)函数必须无返回值,否则不能使用函数 D)函数必须有返回值,返回值类型不定
单选题在类中说明的成员可以使用关键字的是______。
单选题在C++中既可以用于文件输入又可以用于文件输出的流类是______。