选择题 下列定义语句中,错误的是______。
选择题 下列关于栈叙述正确的是______。
选择题 在软件开发中,需求分析阶段可以使用的工具是______。
选择题 对于长度为n的线性表,在最坏情况下,下列各排序法所对应的比较次数中正确的是______。
选择题 下面程序的输出结果是 。
#include<iostream>
#include<string>
using namespace std;
void main(){
charp1[10],p2[10];
strcpy(p1,'abc');
strcpy(p2,'ABC');
charstr[50]='xyz';
strcpy(str+2,strcat(p1,p2));
cout<<str;
}
选择题 有下列程序:
#include <stdio.h>
int f(int x,int y)
{return((y-x)*x);}
void main()
{ int a=3,b=4,c=5,d;
d=f(f(a,b),f(a,c));
printf('%d\n',d);
}
程序运行后的输出结果是______。
选择题 下列程序的输出结果为 。
#include<iostream.h>
#include<iomanip.h>
voidmain()
{
cout.precision(4);
cout<<123.127;
cout<<''<<123.46:
}
选择题 已知int m=10;在下列定义引用的语句中,正确的是______。
选择题 有如下程序;
#include<lostream>
using namespace std;
void fun(inta, ______) {int c; c=a; a=b; b=c; }
int main(){
int x=14, y=20;
fun(x, y);
cout<<x<<y;
return 0;
}
运行后的输出结果是“2020”,则横线处的语句应为______。
选择题 语句int *p=k;定义了指针p,与这个语句等效的语句序列是______。
选择题 设有以下定义和程序:
#include <iostream.h>
class A1
{
public:
void show1()
{
cout<<'class A1'<<end1;
}
};
Class A2: public A1
{
public:
void show2()
{
cout<<'Class A2'<<end1;
}
};
Class A3: protected A2
{
public:
void show3()
{
cout<<'Class A±'<<end1;
}
};
void main()
{
A1 obj1;
A2 obj2;
A3 obj3;
}
则以下不合语法的调用语句是 。
选择题 在C++语言系统中,用于输出数据所使用的标识符cout是______。
选择题 下面对对象概念描述错误的是______。
选择题 若已定义:
int a[]={0,1,2,3,4,5,6,7,8,9},*p=a,i;
其中0≤i≤9,则对a数组元素不正确的引用是______。
选择题 可以用p.a的形式访问派生类对象p的基类成员a,其中a是______。
选择题 下列说法正确的是______。
选择题 若为Fraction类重载前增1运算符++,应在类体中将其声明为______。
选择题 有下列程序:
#include <stdio.h>
void fun(int*a,int*b)
{ int*c;
c=a;a=b;b=c;
}
void main()
{ int x=3,y=5,*p=&,*q=&y;
fun(p,q);printf('%d,%d,',*p,*q);
fun(&x,&y);printf('%d,%d\n',*p,*q)
}
程序运行后的输出结果是______。
选择题 下列函数按每行8个输出数组中的数据。
void fun(int*w,int n)
{ int i;
for(i=0;i<n;i++)
{______
printf('%d',w[i]);
}
printf('\n')
}
下画线处应填人的语句是______。
选择题 面向对象的开发方法中,类与对象的关系是______。
