大学C++复习题

大学C++复习题
大学C++复习题

C++复习题

一、简答题

1.在c++中,内联函数中不能使用什么语句?

答:不允许使用循环语句和分支语句

2.在c++中,封装可以由那几个关键字提供控制方式?分别作用是什么?

答:在类定义体里,使用了private、protected、public三个关键字是用来说明数据成员和函数成员的访问权限。

public说明公有成员,该类成员都可以通过对象被访问的。

private说明私有成员,该类成员只能被自己的成员函数或友元访问;

protected说明保护型的成员,可以被自己的成员函数或友元访问,也可以被派生类的函数成员访问;

3.由于二义性原因,一个类如何防止从一个类中重复继承?

答:①通过使用作用运算符“::”明确指出访问的是哪个基类中的成员;②在类中定义同名成员;③虚基类(virtual 继承方式基类名)

4.在c++中,如果在多条继承路径有一个公共的基类,如果想使这个公共的基类只产生一个拷贝,则如何处理这个基类?用什么关键字?

答:将这个公共基类说明为虚基类,用virtual 关键字

5.简单成员函数是指声明中不含有什么关键字的函数?(关注存储类型)

答:简单成员函数是指存储类型为auto型

。static,extern,register

6.静态成员的特点?

答:静态成员的特点是:不管这个类创建多少个对象,其静态成员在内存中只保留一份副本,这个副本为该类的所有对象所共享。

7.当访问私有静态数据成员时,可通过什么来访问?

答:在类外,私有静态数据成员不能直接访问,必须通

过公有的成员函数访问。

8.有关继承,静态成员是否可以被继承?可以。友元是否可以被继承?不可以构造函数是否可以被继承?不可以

9.c++不允许重载什么运算符?

答:成员访问运算符.;作用域运算符∷

;条件运算符?:;成员指针运算符*;长度运算符sizeof()10.那些运算符只能用类运算符来重载?

答:= () [] * 这四个只能用类重载

11.c++提供格式宽度控制方式有哪几种?关键字是?

答1.int width(int val) int width( ) int ios::width(int n) 2.setw(int n) ????

12.十进制数0.1的二进制表示是什么?

答:(0.1)10= (0.000110011...)2,它是无限循环小数。也就是说,十进制数0.1无法精确用二进制表示!

13.简述程序设计的步骤。

答:程序设计一般遵循以下步骤:明确问题;系统设计;用某种语言进行编程;测试与调试;运行与维护

14.简述编译与解释的区别。

答:编译是指把高级语言程序首先翻译成功能上等价的机器语言程序或汇编语言程序,然后执行目标代码程序,在目标代码程序的执行中不再需要源程序。

解释则是指对源程序中的语句进行逐条翻译并执行,翻译完了程序也就执行完了,这种翻译方式不产生目标程序。一般来说,编译执行比解释执行效率要高

15.简述C++程序的编译执行过程

答:编译过程主要分为4个阶段:编译预处理;编译、优化阶段;汇编过程;链接程序(?)

16.下面哪一些是合法的C++字面常量,它们的类型是什么?

-5.23, 1e+50, -25, 105, 20

.20, e5, 1e-5, -0.0e5, '\n'

-000, 'A', '5', '3.14', false

red, '\r', '\f' "Today is Monday.", "\""

答:字面常量是指在程序中直接写出常量值的常量。-5.23, 1e+50,-25, 20 ,.20, 1e-5, -0.0e5, '\n', -000, 'A', '5', '\r', '\f' , "Today is Monday.", "\""都是字面常量。其中:

整数类型常量:-25, 20, -000

实数类型常量:-5.23, 1e+50 , .20, 1e-5, -0.0e5

字符常量: '\n', 'A', '5', '\r', '\f'

字符串常量:"Today is Monday.", "\""

17.什么是符号常量?符号常量的优点是什么?

答:符号常量是指有名字的常量,在程序中通过常量的名字来使用这些常量。程序中使用符号常量有以下优点:(1)增加程序易读性;(2)提高程序对常量使用的一致性;(3)增强程序的易维护性

18.如何理解变量?变量定义和声明的作用是什么

答:值可以改变的量叫变量,可变的数据.使用变量前,C++要对变量做声明

19.指针类型主要用于什么场合?引用类型与指针类型相比,其优势在哪里?

答:指针类型主要用于参数传递和对动态变量的访问。在C++中,指针类型还用于访问数组元素,以提高访问效率。

引用类型与指针类型都可以实现通过一个变量访问另一个变量,但访问的语法形式不同:引用是采用直接访问形式,指针则采用间接访问形式。在作为函数参数类型时,引用类型参数的实参是一个变量,而指针类型参数的实参是一个变量的地址。

除了在定义时指定的被引用变量外,引用类型变量不能再引用其他变量;而指针变量定义后可以指向其他同类型的变量。因此,引用类型比指针类型要安全。20.const int * p1 和int * const p2的区别是什么?

答:const int * p1 是指向常量的指针,指针指向一个常量,无需初始化,指针本身可以改变,但是指针指向的值不能改变。

int * const p2是指向常量的引用,使用时必须初始化,而且初始化后,引用值不可以改变,引用的常量也不能改变。

21.表达式中的类型转换规则是什么?下面的表达式计算时如何进行操作数类型转换?

(1)3/5*12.3

(2)'a'+10*5.2

(3)12U+3.0F*24L

表达式中类型转换规则是:基于单个操作符依次进行转换。1)3 与 5 同类型,不转换,结果为0,转换成double 型后与12.3 做乘法。2)10 转换成double型与 5.2 做乘法,’a’转换成double型后与前者结果做加法。22.将下列公式表示成C++的表达式:

(1)

a ac

b b

2

4 2-

+

-

(可利用C++标准库中的求平方根的函数:sqrt(x))

(-1*b+sqrt(b*b-4*a*c))/(2*a)

(2))

)(

)(

(c

s

b

s

a

s

s-

-

-

:sqrt(s*(s-a)*(s-b)*(s-c))

(3)

3

4

5.2

1

33r

c

b

d

c

b

a?

?

+

+

+

?

?

((a*b)/(c*d))*(3/(1+(b/(2.5+c))))+(4*pi*r*r*r/3) 23.派生类构造函数执行的次序是怎样的?

答:派生类构造函数执行的一般次序为:调用基类构造函数;调用成员对象的构造函数;派生类的构造函数体中的内容。

24.如果在派生类B已经重载了基类A的什么叫做多态性?在C++中是如何实现多态的?

答:多态是指同样的消息被不同类型的对象接收时导致完全不同的行为,是对类的特定成员函数的再抽象。C++支持的多态有多种类型,重载(包括函数重载和运算符重载)和虚函数是其中主要的方式。

25.一个成员函数fn1(),没有重载成员函数fn2(),如何调用基类的成员函数fn1()、fn2()?

答:A::fn1(); fn2();

26.如果类A是类B的友元,类B是类C的友元,类D 是类A的派生类,那么类B是类A的友元吗?类C是类A的友元吗?类D是类B的友元吗?

答:类B不是类A的友元,类C不是类A的友元,类D 不是类B的友元

二、选择题

1. 下列的各类函数中,C不是类的成员函数。

A) 构造函数B) 析构函数

C) 友元函数D) 拷贝初始化构造函数

2.作用域运算符“::”的功能是D 。

A) 标识作用域的级别的

B) 指出作用域的范围的

C) 给定作用域的大小的

D) 标识成员是属于哪个类的

3. A是析构函数的特征。

A) 一个类中只能定义一个析构函数

B) 析构函数名与类名不同

C) 析构函数的定义只能在类体内

D) 析构函数可以有一个或多个参数

4下述静态数据成员的特性中,D是错误的。

A) 说明静态数据成员时前边要加修饰符static

B) 静态数据成员要在类体外进行初始化

C) 引用静态数据成员时,要在静态数据成员前加<类名>和作用域运算符

D) 静态数据成员不是所有对象所共用的

5. 友元关系不能 C

A) 是类是与类的关系

B) 是一个类成员函数与另一个类的关系

C) 继承 D) 提高程序的运行效率

6.下列关于对象数组的描述中, D 是错的。

A) 对象数组的下标是从0开始的

B) 对象数组的数组名是一个常量指针

C) 对象数组的每个元素是同一个类的对象

D) 对象数组只能赋初值,而不能被赋值

7. 下列说明中const char *ptr; ptr应该是 C

A) 指向字符常量的指针

B) 指向字符的常量指针

C) 指向字符串常量的指针

D) 指向字符串的常量指针

8. 已知:print()函数是一个类的常成员函数,它无返回值,下列表示中, A是正确的。

A) void print()const; B) const void print();

C) void const print():D) void print(const);

9. 关于new运算符的下列描述中,D是错的。

A) 它可以用来动态创建对象和对象数组

B) 使用它创建的对象或对象数组可以使用运算符delete 删除

C) 使用它创建对象时要调用构造函数

D) 使用它创建对象数组时必须指定初始值

10. 下列对派生类的描述中,D是错的

A) 一个派生类可以作另一派生类的基类

B) 派生类至少有一个基类

C) 派生类的成员除了它自己的成员外,还包含了它的基类的成员

D) 派生类中继承的基类成员的访问权限到派生类中保持不变

11. 派生类的构造函数的成员初始化列表中,不能包含 D

A) 基类的构造函数

B) 派生类中子对象的初始化

C) 派生类中一般数据成员的初始化

D) 基类的子对象初始化

12. 设置虚基类的目的是B

A) 简化程序B) 消除二义性

C) 提高运行效率D) 减少目标代码

13. 下列函数中,C不能重载

A) 成员函数B) 非成员函数

C) 析构函数D) 构造函数

注:重载函数:同名不同参(个数、类型、顺序)

14. 关于动态联编的下列描述中D 是错误的A) 动态联编是以虚函数为基础的

B) 动态联编是在运行时确定所调用的函数代码的

C) 动态联编调用函数操作是指向对象的指针或对象引用

D) 动态联编是在编译时确定操作函数的

15. 关于虚函数的描述中,D是正确的

A) 虚函数是一个static类型的成员函数

B) 虚函数是一个非成员函数

C) 基类中说明了虚函数后,派生类中与其对应的函数可不必说明为虚函数

D) 派生类的虚函数与基类的虚函数具有不同的参数个数和类型

16. 下列描述中,D是抽象类的特性

A) 可以说明虚函数

B) 可以进行构造函数重载

C) 可以定义友元函数

D) 不能说明其对象

17. 在类定义的外部,可以被访问的成员有C

A) 所有类成员B) private的类成员

C) public的类成员

D) public或private的类成员

18.下面对构造函数的不正确描述是B

A) 系统可以提供默认的构造函数

B) 构造函数可以有参数,所以可以有返回值没有

C) 构造函数可以重载

D) 构造函数可以设置默认参数

19. 在创建派生类对象时,构造函数的执行顺序是D

A) 对象成员构造函数、基类构造函数、派生类本身的构造函数

B) 派生类本身的构造函数、基类构造函数、对象成员构造函数

C) 基类构造函数、派生类本身的构造函数、对象成员构造函数

D) 基类构造函数、对象成员构造函数、派生类本身的构造函数

20. 在C++中,要实现动态联编,必须使用D调用虚函数

A) 类名B) 派生类指针

C) 对象名D) 基类指针

三、运行结果

1.在你的计算机上运行下面的程序:

#include

using namespace std;

int main()

{ double a=3.3, b=1.1;

int i=a/b;

cout << i << endl;

return 0;

}

结果与你预期的是否相符?如果不符,请解释它的原因

结果为 2。小数 3.3 和 1.1 无法用double型精确表示。

结果比3.0小,所以转换成int型后为 2

2.写出下面程序的执行结果:

#include

using namespace std;

int count=0;

int fib(int n)

{ count++;

if (n==1 || n==2)

return 1;

else

return fib(n-1)+fib(n-2);

}

int main()

{ cout << fib(8);

cout << ',' << count << endl;

return 0;

}

递归。。。。结果:21,41

3.#include

class CPoint

{ public:

CPoint (){ X=Y=0; cout<<”缺省构造

(”<

CPoint (int x0, int y0){ X=x0;Y=y0; cout<<”构造

(”<

~ CPoint(){ cout<<”析构(”<

private:

int X,Y;

};

void main()

{ CPoint p1(3,4),p2; }

运行结果:构造(3,4)

缺省构造(0,0)

析构(0,0)

析构(3,4)

4.#include

class Base

{public: Base(){cout<<"Base"<

};

class Level1: virtual public Base

{

public:

Level1(){cout<<"Level1"<

}

};

class Level2: virtual public Base

{

public:

Level2(){cout<<"Level2"<

}

};

class Toplevel: public Level1, public Level2

{

public:

Toplevel(){cout<<"TopLevel"<

}

};

void main(){ Toplevel t; }:

运行结果:Base

Leve11

Leve12

TopLeve1

5.class B1

{ public:

B1(int i) {cout<<"constructing B1 "<

~B1() {cout<<"destructing B1 "<

};

class B2

{public:

B2(int j) {cout<<"constructing B2 "<

};

class B3

{public:

B3(){cout<<"constructing B3 *"<

~B3() {cout<<"destructing B3 "<

};

class C: public B2, public B1, public B3

{public:

C(int a, int b, int c, int d):

B1(a),memberB2(d),memberB1(c),B2(b){}

private:

B1 memberB1;

B2 memberB2;

B3 memberB3;

};

void main()

{ C obj(1,2,3,4); }

运行结果:constructing B2 2

constructing B1 1

constructing B3 *

constructing B1 3

constructing B2 4

constructing B3 *

destructing B3

destructing B2

destructing B1

destructing B3

destructing B1

destructing B2

6.编写函数reverse(char *s)的倒序递归程序,使字符串s 倒序#include

参考答案:

#include

using namespace std;

void reverse(char *s, char *t)

{ char c;

if (s < t)

{ c = *s;

*s = *t;

*t = c;

reverse(++s, --t); } }

void reverse( char *s)

{ reverse(s, s + strlen(s) - 1); }

void main()

{ char str1[20];

cout << "输入一个字符串:";

cin >> str1;

cout << "原字符串为:" << str1 << endl;

reverse(str1);

cout << "倒序反转后为:" << str1 << endl;

}

程序运行输出:

输入一个字符串:abcdefghijk

原字符串为:abcdefghijk 倒序反转后为:kjihgfedcba

7.定义一个tree类,有成员ages,成员函数grow(int years)对ages加上years,age()显示tree对象的ages的值。

参考算法:

#include

using namespace std;

class Tree {

int ages;

public:

Tree(int n=0); //复制构造函数

~Tree();

void grow(int years);//声明了成员函数

void age();

};

Tree::Tree(int n) { //复制构造函数的实现

ages = n;

}

Tree::~Tree() {

age();

}

void Tree::grow(int years) { //定义了之前声明的两个函数

ages += years;

}

void Tree::age() {

cout << "这棵树的年龄为" << ages << endl;

}

void main()

{

Tree t(12);

t.age(); //需要计算,最后输出。

t.grow(4);

}

程序运行输出:

这棵树的年龄为12

这棵树的年龄为16

四、编程题

1.编写一个程序,将华氏温度转换为摄氏温度。转换公式为:

c =

9

5

(f-32),其中,c为摄氏温度,f为华氏温度解:#include

using namespace std;

int main()

{ double c, f;

cout << "Please input an F-temperature : " << endl;

cin >> f;

c = (f - 32) * 5 / 9;

cout << "The C-temperature is : " << c << endl;

return 0;

}

2.编写一个程序,分别按正向和逆向输出小写字母a~z。

var i:byte;

begin

for i:=ord('a') to ord('z') do

write(chr(i));

writeln;

for i:=ord('z') downto ord('a') do

write(chr(i));

end.

int main(){

int i;

for(i='a',i<='z',i++)//没错!

{

printf("%c",i);

}

for(i='z',i>='a',i--){

printf("%c",i);

}

}

3.编写一个程序,从键盘输入一个正整数,判断该正整数为几位数,并输出其位数。

#include

using namespace std;

int main()

{ unsigned int Z;

int count = 0;

while (1)

{ cout << "Please input an integer(greater than zero) : " << endl;

cin >> Z;

if (Z<=0)

cout << "Your input is wrong! Please input again..." << endl;

else

break;

}

while (Z!=0)

{ Z = Z/ 10;

count++;

}

cout << "The number of digits in the interger is : " << count << endl;

return 0;

}

4.编写一个程序,求所有这样的三位数,它们等于它们的各位数字的立方和。

例如:153 =13+33+53

#include

using namespace std;

int main()

{

int num;

int i=0;

cout<<"Enter a number: ";

cin>>num;

while(num>0)

{

i++;

num=num/10;

}

cout<<"This number bits is: ";

cout<

cout<<'\n';

system("pause");

return 0;

}

5.编写一个程序,求a和b的最大公约数。

解:#include

using namespace std;

int main()

{ int a, b;

cout << "Please input a, b : " << endl;

cin >> a >> b;

int c=(a>b)?b:a;

while (c > 0)

{ if (a%c == 0 && b%c == 0) b reak;

c--;

}

cout << c << endl;

return 0;

}

#include

using namespace std;

int main()

{ int a, b;

cout << "Please input a, b : " << endl;

cin >> a >> b;

int c;

do

{ c = a-b*(a/b);

a = b;

b = c;

} while (c != 0);

cout << a << endl;

return 0;

}

6.定义一个整型变量a,一个整型指针p,一个引用r,通过p把a的值改为10,通过r把a的值改为5

解:

void main()

{

int a;

int *p = &a;

int &r = a;

*p = 10;

r = 5;

}

7.将下面的for循环重写为等价的while循环。

for (i=0; i

if (input_line[i]== '?') quest_count++;

while()

i=0;

while(i

if (input_line[i]== '?') quest_count++;

i++;

}

8.编写一个函数,判断其int型参数值是否是回文数。回文数是指从正向和反向两个方向读数字都一样,例如,9783879就是一个回文数。

解:

bool is_huiwen(int num)

{ char wei[100], i=0;

while (num != 0)

{ wei[i] = num % 10;

num /= 10;

i++;

}

for (int j = 0; j <= i/2; j++)

{ if (wei[j] != wei[i-j-1])

return false;

}

return true;

}

9.编写一个函数计算一元二次方程的根。要求:方程的系数和根均用参数传递机制来传递。

解:

int qiugen(double a, double b, double c, double &x1, double &x2) { int i = b*b-4*a*c;

if (i>=0)

{ x1 = (sqrt(i)-b)/(2*a);

x2 = (0-sqrt(i)-b)/(2*a);

return 1;

}

else

{ x1 = (0-b)/(2*a);

x2 = sqrt(0-i)/(2*a);

return 0;

}

}

10.定义一个Circle类,有数据成员半径Radius,成

员函数GetArea(),计算圆的面积,构造一个Circle的对象进行测试。

#include

using namespace std;

class circle

{

public:

float GetArea();

private:

float Radius;

};

circle::circle()

{

Radius=1.0;

}

circle::circle(float r)

{

Radius=r;

}

float circle::GetArea()

{

return Radius*Radius*3.14;

}

int main()

{

circle c1;

cout<<"圆1的面积:"<

circle c2(10);

cout<<"圆2的面积:"<

return 0;

}

11.定义一个有五个元素的整型数组,在程序中提示用户输入元素值,最后再在屏幕上显示出来。

#include

using namespace std;

int main()

{

int array[5]={0}; //定义5个元素的int型数组

for(long k=0; k<5; k++)

{

cout<<"请输入第"<

cin>>array[k]; //接受用户输入值存入数组

cout<

}

cout<<"所输入的全部元素为:"<

for(k=0; k<5; k++)cout<

cout<

return 0;

}

12.用一条语句定义一个有5×3个元素的二维整型数组,并依次赋予1~15的初值。

int theArray[5][3] = { {1,2,3},{4,5,6},{7,8,9},{10,11,12},{13,14,15} };

13.编写一个函数,统计一个英文句子中字母的个数,在主程序中实现输入、输出。

#include

#include using namespace std ;

int main()

{

string Str;

char ch ;

int i=0,cnt=0;

cout << "input str:" ;

getline(cin , Str );

for ( i=0;i

{

if ( Str[i] >='a' && Str[i]<='z' || Str[i] >='A' &&

Str[i]<='Z' )

cnt++;

}

cout << "str="<

cout << "字母个数:" << cnt <

system("pause");

return 0;

}

14.下列程序有何问题,请仔细体会使用指针时应避免出现这个的问题。

#include

int main()

{

int *p;

*pInt = 9;

cout << "The value at p: " << *p;

return 0;

}

五补充:

1.异常程序错误分为三种:(1)语法错误;(2)逻辑错误;(3)运行异常;

异常处理的三个基本步骤:(1)检查异常(try块语句);(2)抛出异常(throw块语句);(3)捕获异常(catch块语句);

2.使用setw设置宽度(dec:十进制;hex:十六进制;oct:八进制)。输出流缺省是右对齐文本,若需实现左对齐,则需调用setiosflags函数,他的作用是持续的,调用后输出都是左对齐。

3.枚举类型:只要将需要的变量值一一列举出来,便构成了一个枚举类型。

枚举值可以进行关系运算。整数值不能直接赋给枚举变量,如需要将整数赋值给枚举变量,应进行强制类型转换。

4.多态性:指向不同的对象发送同一消息,不同的对象在接收时会产生不同的行为。多态:同一名称,不同的功能实现方式。

目的:达到行为标识统一,减少程序中标识符的个数。实现:重载函数和虚函数

虚函数:是重载的另一种表现形式(virtual)。

5.构造函数、复制构造函数、析构函数、成员函数、默认函数都是无返回值的;构造函数用于初始化成员函数,(构造、析构、友元函数都不能被继承)。

派生类拥有基类的所有特征,并可以定义新的特征或对基类的一些特征进行重定义。

继承分为:单继承和多继承:((1)单继承:一个类最多有一个直接基类;(2)多继承:一个类可以有多个直接基类。

对虚函数有下面几点限制:(1)只有类的成员函数才可以是虚函数;(2)静态成员函数不能是虚函数;(3)构造函数不能是虚函数;(4)析构函数可以(往往)是虚函数。

对于包含虚基类的类:(1)虚基类的构造函数由该类的构造函数直接调用;(2)虚基类的构造函数优先非虚基类的构造函数执行。

构造函数的作用是在对象被创建时使用特定的值构

造对象,或者说将对象初始化为一个特定的状态;(1)在对象创建时由系统自动调用;(2)如果程序中未声明,则系统自动产生出一个隐含的参数列表为空的构造函数;(3)允许为内联函数、重载函数、带默认形参值的函数。

拷贝构造函数是一种特殊的构造函数,其形参为本类的对象引用。

析构函数;(1)完成对象被删除前的一些清理工作;(2)在对象的生存期结束的时刻系统自动调用它,然后再释放此对象所属的空间;(3)如果程序中未声明析构函数,编译器将自动产生一个隐含的析构函数。

结构体是一种特殊形态的类与类的唯一区别:类的缺省访问权限是private,结构体的缺省访问权限是public 结构体存在的主要原因:与C语言保持兼容。

什么时候用结构体而不用类定义主要用来保存数据、而没有什么操作的类型人们习惯将结构体的数据成员设

为公有,因此这时用结构体更方便。

break语句:使程序从循环体和switch语句内跳出,继续执行逻辑上的下一条语句。不宜用在别处。

continue 语句:结束本次循环,接着判断是否执行下一次循环。

调用前先声明函数原型:在调用函数中,或程序文件中所有函数之外,按如下形式说明:类型标识符被调用函数名(含类型说明的形参表);

调用形式:函数名(实参列表);

嵌套调用:函数可以嵌套调用,但不允许嵌套定义;

递归调用:函数直接或间接调用自身。

在函数被调用时才分配形参的存储单元;实参可以是常量、变量或表达式;实参类型必须与形参相符;传递时是传递参数值,即单向传递。

对引用类型需要注意下面几点:(1)定义引用类型变量时,应在变量名加上符号“&”,以区别于普通变量;(2)定义引用变量时必须要有初始化,并且引用变量和被引用变量应具有相同的类型(int x;int &y=x;)(3)引用类型的变量定义之后,它不能再引用其它变量。(int x1,x2;int &y=x1;......y = &x2; //Error)

通过把形参定义成对常量的引用,可以防止在函数中通过形参改变实参的值。

默认形参值必须从右向左顺序声明,并且在默认形参值的右面不能有非默认形参值的参数。因为调用时实参取代形参是从左向右的顺序。

C++的系统库中提供了几百个函数可供程序员使用。求平方根函数(sprt)、求绝对值函数(abs)等。正弦值sin()、余弦值cos()、正切值tan(),使用系统函数时要包含相应的头文件math.h 或cmath。

重载:把多个功能类似的函数定义成同名函数。重载函数的形参必须不同:个数不同或类型不同。

编译程序将根据实参和形参的类型及个数的最佳匹

配来选择调用哪一个函数。

不要将不同功能的函数声明为重载函数,以免出现调用结果的误解、混淆。

重载函数的“二义性”错误:(1)返回值类型不同,参数相同;(2)仅用了const或引用造成的参数类型不同;(3)使用了修饰符造成的的参数类型不同的函数,可能引起二义;(4)缺省参数引起的二义性

六其他考题

1.什么是类什么是对象,指出他们之间的关系。

答:类实际上是一种抽象的数据类型,它将完成某特定功能所用到的数据和对数据的操作(或称功能,即函数)封装在一起。对象是类的实例,是指具有某些属性和功能的单个个体。消息是对象之间相互请求或相互协作的途径,是要求某个对象执行其中某个功能操作的规格说明。

类是一类对象的综合描述,是一种类型,而对象是类的一个实例。

2.数组在函数间的传递形式有哪些?

答:数组在函数间的传递形式有复制传递方式、地址传递方式、引用方式和全局数组传递方式。

3.什么是关键字什么是标示符?

答:关键字(Keyword)也叫保留字(Reserved Word)。所谓关键字就是指已被C++语言本身使用, 不能作为其它用途使用的单词。

标识符是用户为程序中各种需要命名的"元素"所起的名称, 它是字母或下划线起头的字母、数字或下划线串。

4.C++中常量有哪几种?

答:有整型常量、实型常量、字符型常量、字符串型常量、符号常量和换码序列六种。

5.什么是指针变量?什么是指针所指向的目标?

答:指针变量是一种变量,用来存放另一个变量的地址。将某变量的地址存放到一个指针变量中后,就称这个指针变量指向该变量。

6.This指针有什么作用

答:This指针指向引用函数所属的对象自己,它隐含于每个成员函数中。

7.什么叫声明语句?什么叫局部变量?什么叫全局变量?

答:一般来说,变量在使用以前,必须说明才能使用。用来说明已有类型的变量的语句称为变量声明语句。变量说明的一般形式是:<存储类型><数据类型><变量名>;

在函数体或复合语句中声明的变量,它们只能在函数体或复合语句中使用,称为局部变量;在函数体外声明的变量,它们可以在多个函数体中使用,通常称为全局变量。

8.请说出函数参数中,复制与引用传递参数方式两者之间的异同点。

答:复制传递方式是实参的数据拷贝给了形参变量,实参和形参是具有相同数据类型但存储空间是不同的两

组空间。在复制传递方式下,被调用函数里对形参的操作不能改变实参的内容。

引用传递方式,实参要求为变量,形参为同类型的引用。采用引用方式实参和形参使用的是相同的内存空间,只是名称不同而已。但在引用传递方式下,被调用函数里对形参的操作将改变实参的内容。

复制传递方式和引用传递方式都可以将实参传递给被调用函数,并且在被调用函数中使用形式完全相同。

9.简述C++语言具有的特点

答:(1)C++语言是中级的程序设计语言;(2)是结构式的程序设计语言;(3)是面向对象的程序设计语言;(4)功能齐全;(5)移植性好。

最新大学英语1考试题库及答案

大学英语1测试答案 注意:标红为答案 测验一: (AABAA BBACA CBCCA CAAAA,题目顺序随机)题目1:They have a share.

A. each; B. every 题目2:child enjoys Christmas. A. Every; B. Each 题目3:My pen is lost. This one is my A. brother; B. brother's 题目4:Have you the skirt by yourself? A. made; B. built 题目5:My room is than the one next door. A. cleaner; B. cleanner; C. cleanest 题目6:John is the of the three brothers. A. taller; B. tallest; C. tall 题目7:We've entered an agreement. A. for; B. into; C. * 题目8:He entered his son the English examination. A. for; B. into; C. * 题目9:No one saw the thief when he entered the buliding. A. for; B. into; C. * 题目10:Everyone he will win. A. believes; B. believe 题目11:Just then, the telephone rang. It rang____. A. at once; B. immediately; C. again; D. at that moment 题目12:The shop assistant found some curtain material___me.

江苏大学大一c语言期末复习题汇总

选择题1.下列字符序列中,不可用作C语言标识符的是()。 A.abc123 B.C._123_ D._ok 2.请选出可用作C语言用户标识符的一组标识符()。 A.void B.a3_b3 C.For D.2a define _123 -abc DO WORD IF Case sizeof 3.不属于C语言关键字的是()。 A.int B.break C.while D.character 4.以下不能定义为用户标示符的是()。 A.scanf B.Void C._3com_ D.int 5.C语言程序的基本单位是()。 A.程序行B.语句C.函数D.字符 6.以下说法中正确的是()。 A.C语言程序总是从第一个定义的函数开始执行 B.在C语言程序中,要调用的函数必须在main( )函数中定义 C.C语言程序总是从main( )函数开始执行 D.C语言程序中的main( )函数必须放在程序的开始部分 7.以下选项中,合法的用户标识符是()。 A.long B._2abc C.3dmax D. 8.已知大写字母A的ASCII码值是65,小写字母a的ASCII码是97,则用八进制表示 的字符常量’\101’是()。 A.字符A B.字符a C.字符c D.非法的常量 9.以下选项中,正确的字符常量是()。 A.”F”B.’\\’’C.’W’D.’’ 10.下列变量定义中合法的是 A.short _a=; B.double b=1+; C.long do=0xfdaL; D.float 2_and=1-e-3; 11.为了避免嵌套的if-else语句的二义性,C语言规定else总是与()组成配对关系。 A.缩排位置相同的if B.在其之前未配对的if C.在其之前未配对的最近的if D.同一行上的if 12.下列运算符中优先级最高的是()。 A.< B.&& C.+ D.!= 13.判断char型变量s是否为小写字母的正确表达式是()。 A.’a’ <= s<=’z’B.(s>=’a’) & (s<=’z’) C.(s>=’a’) && (s<=’z’) D.(’a’<=s) and (’z’>=s)

北京大学 2010年 普通生物学期末考试题

北京大学生命科学学院考试专用纸姓名:学号:考试类别: 考试科目:普通生物学A 考试日期:2010-6-11阅卷教师:佟向军 以下为答题纸,共7 页

一、填空(每空0.5分,共35分) 1.我们的身体无法利用纤维素,是因为我们消化道内的________酶仅能水解________ 键,而无法水解_________键。构成淀粉和纤维素的单体都是________。 2.根据是否有细胞核膜来区分,细胞分为_______细胞和_______细胞。细胞骨架包括________、________以及________三种成分。其中:有丝分裂时,形成纺锤丝的是______,与胞质分裂相关的是________,与肌肉收缩有关的是______。 3.光合作用的光反应阶段在______进行,它又可分为光系统I和光系统II。前者的产物是______,后者的产物是________。光合作用的暗反应在___________进行,其主要作用是固定______,这一过程称为__________循环。4.细胞通讯与信号传递,对细胞的生命活动很重要。在这一过程中,能引起细胞反应的信号分子叫做________,包括______和______两大类。细胞本身与信号分子结合的蛋白质叫做________,它们在细胞中的位置各不相同,脂溶性信号分子的结合蛋白,主要位于__________,水溶性信号分子的结合蛋白,主要位于________。在细胞内,起第二信使作用的有________(举一例即可)。5.细胞周期包括_____、________、_______和______四个时期。DNA复制在____期。调节细胞周期的因子叫做____________,它由______和______两种蛋白组成。细胞周期有_____个检验点,它们分别位于____________期。 6.人的α-珠蛋白基因位于16p13.33, 其中16代表________________,p代表_________,13代表_______________。 7.DNA的复制是__________方式,即两条DNA链解开,分别以各自为____________,按照____________________原则,合成其互补链。复制所需要的酶主要是________________;复制无法从头开始,需要________________,它的成分是________________。新链的延伸方向是____________________,因此一条链连续复制,称为______________,另一条链复制不连续,称为____________,不连续的DNA片段叫做______________。 8.原核生物基因表达调控的主要方式是________________,它由____________、

(完整word版)大学英语一期末考试题以及答案

精心整理 大学英语(一) 行政班级分级班级姓名学号 C. A measuring system. D. A control system. 2. A. Car prices. B. Car services.

C. The company’s business. D. The company’s culture. 3. A. It’s easy to do. B. It’s challenging. dialogue, there are some recorded questions. Both the conversations and questions will be spoken two times. Conversation 1

6. A. Breakfast. B. Dinner. C. A 5 dollar gift card. D. Bus service to the airport. 10. A. Make an appointment with her. B. Talk with her about a new order.

C. Send her an email about the shipment. D. Call her back when receiving the shipment. Directions: This part is to test your ability to construct grammatically correct sentences. It consists of 2 sections.

大一C语言期末考试题

大一C语言期末考试题 悬赏分:40 |解决时间:2010-6-29 14:28 |提问者:345387547 1. 数组int a[3][5]; 共定义了______15__个元素。 2. 有float f= 3.1415927; 则printf(“%5.4f”, f );输出的结果是___3.1416__。 3. 下面程序的功能是:输出100以内(不包含100)能被3整除且个位数为6的所有整数,请填空。 main( ) { int i; for(i=1; __i<100 ___; i++) if (_(i%3==0)&&(i%10==6)_) printf("%d", i); } 4. 设有“int x=2, y”说明,则逗号表达式“y=x+5,x+y”的值是____7____ 5. 以下是使用指针,进行字符串复制的程序,请填空。 main() { char a[]= “Tsinghua University”, b[30], *p1,*p2; p1=a; p2=b; for(; *p1!= __'\0'____; p1++, p2++) *p2 _=_*p1; *p2= ___'\0'______; printf(“string a is:%s\n”,a); printf(“string b is:%s\n”,b); } 6. 下面程序用冒泡法对数组a进行降序排序,请填空。 main() { int a[5]={4,7,2,5,1}; int i,j,m; for(i=0;i<4;i++) for(j=0;j<____4____;j++) if( a[j]

大学英语一级期末考试试题

大学英语一级期末考试试题(B卷) 课程名称:《大学英语读写I 》任课教师签名: 大学英语教学部(一教) 出题教师签名: 题库审题教师签名: 张文君_____ 考试方式(闭)卷适用专业 07级化工与制药学院、材料学 院、理学院、经管学院和 法学院共58个班 考试时间( 120 )分钟 Part I. Reading Comprehension (2’X20=40’) Directions: Read the following three passages carefully and do the multiple-choice questions. Passage One Dogs are social animals and without proper training, they will behave like wild animals. They spoil your house, destroy your belongings, bark excessively, fight other dogs and even bite you. Nearly all behavior problems are perfectly normal dog activities that occur at the wrong time or place or are directed at the wrong things. The key to preventing or treating behavior problem is learning to teach the dog to redirect its normal behavior problems, but it is the foundation for solving just about any problem. Training opens up a line of communication between you and your dog. Effective communication is necessary to instruct your dog about what you want it to do. Training is also an easy way to establish the social rank order. When your dog obeys a simple request of “come here, sit”, it is showing obedience and respect for you. It is necessary to establish yourself as top dog or leader of the dog pack by using extreme measures. You can teach your dog its subordinate role by teaching it to show submission to you. Most dogs love performing tricks for you pleasantly if they accept that you are in charge. Tainting should be fun and rewarding for you and your dog. It can enrich your relationship and make living together more enjoyable. A well-trained dog is more confident and more safely allowed a greater amount of freedom than an untrained animal. 1. Behavior problems of dogs are believed to _______. A) worsen in modern society B) be just part of their nature C) occur when they go wild D) present at threat to the community 2. The primary purpose of obedience training is to ________. A) enable the dog to regain its normal behavior B) teach the dog to perform clever tricks C) make the dog aware of its owner’s authority D) provide the dog with outlets for its wild behavior 3. Effective communication between a dog and its owner is _______. A) an extreme measure in obedience training B) a good way to teach the dog new tricks C) the foundation for dogs to perform tasks D) essential to solve the dog’s behavior problems 4. Why do pet dogs love performing tricks for their masters? A) To show their willingness to obey. B) To show their affection for their masters. C) To avoid being punished. D) To win leadership of the dog pack. 5. When a dog has received effective obedience training, its owner________. A) will enjoy a better family life. B) can give the dog more freedom C) can give the dog more rewards D) will have more confidence in himself Passage Two: Once upon a time there was a wise man that used to go to the ocean to do his writing. He had a habit of walking on the beach before he began his work. One day he was walking along the shore. As he looked down the beach, he saw a human figure moving like a dancer. He smiled to himself at the thought of someone who would dance on the beach. So he began to walk faster to catch up. As he got closer, he saw that it was a young man and the young man wasn't dancing, but instead he was reaching down to the shore, picking up something and

大学英语(一)模拟试卷一

Network Education College, BLCU 《大学英语(一)》模拟试卷一 注意: 1.试卷保密,考生不得将试卷带出考场或撕页,否则成绩作废。请监考老师负责监督。2.请各位考生注意考试纪律,考试作弊全部成绩以零计算。 3.本试卷满分100分,答题时间为90分钟。 4.本试卷试题为客观题,请按要求填涂答题卡,所有答案必须填涂在答题卡上,答在试题卷上不给分。 I.Multiple Choices. (2 points for each, altogether 40 points) Directions:There are 20 sentences in this section. Beneath each sentence there are four choices respectively marked by letters A, B, C and D. Choose the word that you think best complete the sentence. Write your answers on the answer sheet. 1. The house isn't big enough for a family of four, and_______, the price is not reasonable. A. even though B. furthermore C. therefore D.in that 2. Now there is no need to worry about the deadline since we are ahead of_______. A. table B. chart C. schedule D.graph 3. Doing all the housework_______ my mother at least three hours a day. A. spends B. affords C. occupies D.spares 4. _______ the form with your name and your address. A. Write B. Fill in C. Take down D.cover 5. The_______ runner can run 2 miles in fifteen minutes. A. common B. usual C. average D.general 6. Since it is late to change my mind now, I am_______ to carrying out the plan. A. obliged B. committed C. engaged D.resolved 7. By the time you get to New York, I_______ for London. A. would be leaving B. am leaving C. have already left D.shall have left 8. Researchers discovered that plants infected with a virus give off a gas that_______ disease resistance in neighboring plants. A. contracts B. activates C. maintains D.prescribe 9. By law, when one makes a large purchase, he should have_______ opportunity to change his mind. A. accurate B. urgent C. excessive D.adequate 10. The article suggests that when a person_______ under unusual stress he should be especially careful to have a well-balanced diets. A. is B. were C. be D.was 11. If he _______of all the dangers, he should change his mind. A. knows B. be clear C. hears D.be aware 12. This crop has similar qualities to the previous one, _______both wind-resistant and adapted to the same type of soil. A. being B. been C. to be D.having been

大学C语言期末考试习题集(带详解答案)

一、单项选择题 1.(A)是构成C语言程序的基本单位。 A、函数 B、过程 C、子程序 D、子例程 2.C语言程序从 C开始执行。 A) 程序中第一条可执行语句 B) 程序中第一个函数 C) 程序中的main函数 D) 包含文件中的第一个函数 3、以下说法中正确的是(C)。 A、C语言程序总是从第一个定义的函数开始执行 B、在C语言程序中,要调用的函数必须在main( )函数中定义 C、C语言程序总是从main( )函数开始执行 D、C语言程序中的main( )函数必须放在程序的开始部分 4.下列关于C语言的说法错误的是(B)。 A) C程序的工作过程是编辑、编译、连接、运行 B) C语言不区分大小写。 C) C程序的三种基本结构是顺序、选择、循环 D) C程序从main函数开始执行 5.下列正确的标识符是(C)。 A.-a1 B.a[i] C.a2_i D.int t 5~8题为相同类型题 考点:标识符的命名规则 (1)只能由字母、数字、下划线构成 (2)数字不能作为标识符的开头 (3)关键字不能作为标识符 选项A中的“-”,选项B中“[”与“]”不满足(1);选项D中的int为关键字,不满足(3) 6.下列C语言用户标识符中合法的是( B)。 A)3ax B)x C)case D)-e2 E)union 选项A中的标识符以数字开头不满足(2);选项C,E均为为关键字,不满足(3);选项D中的“-”不满足(1); 7.下列四组选项中,正确的C语言标识符是(C)。 A) %x B) a+b C) a123 D) 123 选项A中的“%”,选项B中“+”不满足(1);选项D中的标识符以数字开头不满足(2) 8、下列四组字符串中都可以用作C语言程序中的标识符的是(A)。 A、print _3d db8 aBc B、I\am one_half start$it 3pai

北京大学操作系统期末试题有答案

操作系统原理试题 一. 名词解释题 1. 中断—— 2. 进程控制块(PCB)――它是进程实体的一部分,是操作系统最重要的记录型数据结构, 是进程存在的唯一标识 3. 虚时钟 4. 段式管理 5. 文件控制块(FCB) 6. 对换(SWAPPING) 7. 系统调用 8. 绝对路径名 9. 特别文件 10.虚设备技术 11.管道 12.中断接收 13.恢复现场 14.页式管理 15.作业步 16.字符流文件 17.通道 18.页面淘汰 19.多道程序设计 20.死锁 21.当前目录 22.快表 23.作业调度 24.原语 25.中断屏蔽 26.地址映射 27.文件目录 28.死锁避免 29.原语 31. CPU 状态 32.虚存

二 . 填空题 1. 分时系统追求的目标是 __及时响应 ___. 2. 用户进程从目态 (常态)转换为管态 (特态)的唯一途径是 ___ 中断 ________ . 3. 从静态的观点看 , 操作系统中的进程是由程序段、数据和 __ 作业控制块 PCB__ 三 部分组成 . 4. 在系统内核中必须包括的处理模块有进程调度、原语管理和 __中断处理 __. 5. 批处理操作系统中 , 作业存在的唯一标志是 _作业控制块 PCB ___. 6. 操作系统中的一种同步机制 , 由共享资源的数据及其在该数据上的一组操作组成 , 该同步机制称为 _管程 ______________ . 7. 在可变分区存储管理中 , 为实现地址映射 , 一般由硬件提供两个寄存器 , 一个是基 址寄存器 , 另一个是 _限长寄存器 ___. 8. 联想寄存器 (相联存储器 ) 的最重要、最独到的特点是 _按内容并行查找 ___. 9. 在虚拟段式存储管理中 , 若逻辑地址的段内地址大于段表中该段的段长 , 则发生 __ 地址越界 __中断 . 10. 文件系统中若文件的物理结构采用顺序结构 , 则文件控制快 FCB 中关于文件的物 理位置应包括 ___ 首块地址和文件长度 _. 11. 在操作系统设计时确定资源分配算法 , 以消除发生死锁的任何可能性 , 这种解决死 锁的方法是 __死锁预防 __. 12. 选择对资源需求不同的作业进行合理搭配 , 并投入运行是由 _作业调度算法 ___来完 成的. 13. 实时系统应具有两个基本特征 : 及时性和 ___可靠性 ___. 14. 磁带上的文件只能采用 _顺序 ______ 存取方式 . 15. 不让死锁发生的策略可以分成静态和动态的两种 , 死锁避免属于 __动态的 ___. 16. 在 UNIX 系统中 , 文件分成三类 , 即普通文件 , 目录文件和 ___特殊文件 __. 17. 在磁盘调度策略中有可能使 I/O 请求无限期等待的调度算法是 __最短寻道时间优先 18. 进程获得了除CPU 外的所有资源,一旦获得CPU 即可执行,这时进程处于—就绪 _ 状态 . 19. ______________________________________________________ 为实现CPU 与外部设备的并行工作,系统必须引入一通道 ____________________________________ 硬件基础. 20. 操作系统为保证不经文件拥有者授权 , 任何其它用户不能使用该文件所提出的解决 措施是 ___文件保密 __. 21. 两个或两个以上程序在计算机系统中同处于开始和结束之间的状态 , 这就称为 __ 并发 ___. 33. 磁盘调度 34. 缓冲技术 36. 进程调度 37. 虚设备 39. 死锁预防 40. 临界资源 — 42. 交换技术 43. 互斥区 段时间内只允许一个进程访问的资源,也称为独立资源

新视野大学英语1试题(A)

《新视野大学英语1》试卷(A) 适用班级:2013-2014第1学期重修班 I. Vocabulary and Structure (20points) Directions: Choose the best one to complete each sentence. 1. She cut her hair short and tried to ____ herself as a man. A. decorate B. disguise C. fabricate D. fake 2. She watched him ____ all the handles and gears in his automobile until she thoughts she could run it herself. A. modulate B. incorporate C. manipulate D. induce 3. The French police are legally entitled to ____ anyone’s movements as they please. A. confine B. restrict C. restrain D. limit 4. Some people argue that the death ____ does not necessarily reduce the number of murders. A. fine B. cost C. punish D. penalty 5. The university ____ consists of full professors, associate professors and assistant professors. A. crew B. personnel C. faculty D. staff 6. The latest edition of The Complete Works of Lu Xun comes in sixteen ____. A. copies B. volumes C. versions D. editions 7. Many students found the book ____ : it provided them with an abundance of information on the subject.

大学英语第二学期期末试卷A及及答案

XX职业技术学院 2015—2016学年第二学期经济与管理系 2015级三年制会计、会审、旅游管理、物流管理专业 《大学英语》期末考试试题A卷 考试说明:本课程为闭卷考试,可携带文具(或课程为开卷考试可携带文具和资料) I Translate the following English versions into Chinese. 20% 1. 一种文化符号 2. 一则电视广告 3. 时尚和潮流的区别 4. 一个被灌输的概念 5. 自信满满 6. plus 14 percent annual interest 7. Follow your passion, not money 8. the opportunity to get to know yourself 9. all-too-familiar glow on his face 10. the driving directions he gave us II Everyday % (Identify the answer is right or wrong:If the answer is right , you should “A”, if not, choose “B”. ) 1、------Do you like your present job as a secretary -------I’m a nurse in No. 1 hospital. A. Right B. Wrong 2、------Nice to meet you! ------Nice to meet you too. A. Right B. Wrong 3、------Are you the fresh year student in the college ------Yes, I am. A. Right B. Wrong 4、------Can I bring you something to drink at the moment ------Yes, a coca-cola for me, please. A. Right B. Wrong 5、------Have you ever been to America for some reason ------I have never been there, but I hope to go there in the future. A. Right B. Wrong 6、------Is there a bank of China near here ------I saw him this morning. A. Right B. Wrong 7、------Can you remember the doctor’s phone number ------Yes, it’s 6821215. A. Right B. Wrong 8、------Can I help you, Sir ------Yes, I’d like to book a single room for 2 days. A. Right B. Wrong 9、------How do you like the book you are reading recently ------It’s very good. And I like it very much. A. Right B. Wrong 10、------What about seeing a film tonight ------See you later. A. Right B. Wrong III、Reading comprehension 15% Passage A I was having dinner at a restaurant when Harry came in. Harry worked in a lawyer’s office years ago, but h e is now working at a bank. He gets a good salary, but he always borrows money from his friends and never pays

江苏大学大一c语言期末复习题汇总

选择题 1.下列字符序列中,不可用作C语言标识符的是()。 A.abc123 B.no.1 C._123_ D._ok 2.请选出可用作C语言用户标识符的一组标识符()。 A.void B.a3_b3 C.For D.2a define _123 -abc DO WORD IF Case sizeof 3.不属于C语言关键字的是()。 A.int B.break C.while D.character 4.以下不能定义为用户标示符的是()。 A.scanf B.V oid C._3com_ D.int 5.C语言程序的基本单位是()。 A.程序行B.语句C.函数D.字符 6.以下说法中正确的是()。 A.C语言程序总是从第一个定义的函数开始执行 B.在C语言程序中,要调用的函数必须在main( )函数中定义 C.C语言程序总是从main( )函数开始执行 D.C语言程序中的main( )函数必须放在程序的开始部分 7.以下选项中,合法的用户标识符是()。 A.long B._2abc C.3dmax D.A.dat 8.已知大写字母A的ASCII码值是65,小写字母a的ASCII码是97,则用八进制表示 的字符常量’\101’是()。 A.字符A B.字符a C.字符c D.非法的常量 9.以下选项中,正确的字符常量是()。 A.”F”B.’\\’’C.’W’D.’’ 10.下列变量定义中合法的是 A.short _a=1-.le-1; B.double b=1+5e2.5; C.long do=0xfdaL; D.float 2_and=1-e-3; 11.为了避免嵌套的if-else语句的二义性,C语言规定else总是与()组成配对关系。 A.缩排位置相同的if B.在其之前未配对的if C.在其之前未配对的最近的if D.同一行上的if 12.下列运算符中优先级最高的是()。 A.< B.&& C.+ D.!= 13.判断char型变量s是否为小写字母的正确表达式是()。 A.’a’ <= s<=’z’B.(s>=’a’) & (s<=’z’) C.(s>=’a’) && (s<=’z’) D.(’a’<=s) and (’z’>=s) 14.已知x=45, y=’a’, z=0; 则表达式(x>=z && y<’z’ || !y)的值是()。 A.0 B.语法错 C.1 D.“假”

北京大学“学术英语阅读”2017年上学期期末考试真题

2017—2018学年度第一学期期末考试 学术英语阅读 院/系_________________ 姓名_________________ 班级_________________ 学号_________________ Direction Read the following passage. While you’re reading, please pay special attention to the underlined or shaded words, phrases and sentences. You’ll be asked to explain them in English later after reading. The Price of Preference Shelby Steele 5 10 15 20 25 30 In a few short years, many blacks and a considerable number of whites would say that I was sanctimoniously (圣洁地) making affirmative action①into a test of character. They would say that this small preference is the meagerest recompense for centuries of unrelieved oppression. And to these arguments other very obvious facts must be added. In America, many marginally competent or flatly incompetent whites are hired every day—some because their white skin suits the conscious or unconscious racial preference of their employers. The white children of alumni are often grandfathered into elite universities in what can only be seen as a residual benefit of historic white privilege. Worse, white incompetence is always an individual matter, but for blacks it is often confirmation of ugly stereotypes. Given that unfairness cuts both ways, doesn’t it only balance the scales of history, doesn’t this repay, in a small way, the systematic denial under which my children’s grandfather lived out his days? In theory, affirmative action certainly has all the moral symmetry that fairness requires—the injustice of historical and even contemporary white advantage is offset (补偿) with black advantage; preference replaces prejudice, inclusion (1) answers exclusion. It is reformist and corrective, even repentant and redemptive (忏悔与救赎的). And I would never sneer at these good intentions. Born in the late forties in Chicago, I started my education (a charitable term in this case) in a segregated (种族隔离的) school and suffered all the indignities that come to blacks in a segregated society. My father, born in the South, made it only to the third grade before the white man’s fields took permanent priority (永久性优先) over his formal education. And though he educated himself into an advanced reader with an almost professorial authority, he could only drive a truck for a living, and never earned more than $90 a week in his entire life. So yes, it is crucial to my sense of citizenship, to my ability to identify with the spirit and the interests of America, to know that this country, however imperfectly, recognizes its past sins and wishes to correct them. Yet good intentions can blind us to the effects they generate when implemented. In our society affirmative action is, among other things, a (2) testament to white goodwill and to black power, and in the midst of these heavy investments its effects can be hard to see. But after twenty years of implementation I think that affirmative action has shown itself to be more bad than good and that blacks—whom I will focus on in this essay—now stand to lose more from it than they gain. In talking with affirmative action administrators and with blacks and whites in general, I found that supporters of affirmative action focus on its good intentions while detractors (反对者) emphasize its negative effects. Proponents talk about “diversity” and “pluralism”; opponents speak of (3) “reverse discrimination”, the unfairness of quotas (指标) and set-asides (保留名额). [1] It was virtually impossible to find people outside either camp. The closest I came was a white male manager at a large computer ①Affirmative action is the policy of favoring members of a disadvantaged group who suffer or have suffered from discrimination within a culture. 平权运动,扶持政策

相关文档
最新文档