2005下半年程序员级试题答案

上午(每空1分)

(1)

C

(16)

D

(31)

D

(46)

D

(61)

C

(2)

C

(17)

A

(32)

C

(47)

D

(62)

C

(3)

C

(18)

C

(33)

A

(48)

B

(63)

A

(4)

D

(19)

C

(34)

C

(49)

C

(64)

B

(5)

C

(20)

D

(35)

C

(50)

C

(65)

D

(6)

B

(21)

B

(36)

D

(51)

B

(66)

D

(7)

D

(22)

D

(37)

B

(52)

A

(67)

C

(8)

B

(23)

B

(38)

C

(53)

A

(68)

B

(9)

C

(24)

C

(39)

A

(54)

A

(69)

A

(10)

C

(25)

D

(40)

A

(55)

B

(70)

D

(11)

C

(26)

A

(41)

C

(56)

B

(71)

D

(12)

C

(27)

B

(42)

B

(57)

C

(72)

A

(13)

C

(28)

C

(43)

D

(58)

A

(73)

A

(14)

B

(29)

B

(44)

B

(59)

C

(74)

C

(15)

D

(30)

D

(45)

A

(60)

C

(75)

B


下午
试题一
(1) i <= n
(2) ch (j) = KB
(3) k <= j
(4) ch(k-i+1)
(5) n

试题二
(1) n-i-1
(2) Count + 2
(3) a[i] < Minnum
(4) a[n-i-1] >Maxnum
(5) a[n-i-1]

试题三
(1) (low + high) / 2
(2) 1.0 / (p+m)->Ratio
(3) m + 1
(4) (p+1)->Ratio - p->Ratio
(5) Temp - p->Temp

试题四
(1)
密码(&p)
(2) true
(3) Static times
(4) Username.Text = ″ali88″ and Password.Text = ″zmkm″
(5) frmApp.Show

试题五
(1) *s = str
(2) p = root
(3) p = = NULL
(4) parent->Rch
(5) parent->Lch

试题六
(1) shares (n)
04代码行修改结果:public:
06代码行修改结果:Stock (int n,doublepr=3.5):shares (n){
10代码行修改结果:~Stock () {}
输出结果
(2) 0∶0
(3) 0∶0

试题七
(1) 500
(2) S/30
(3) S = 0 or first
(4) H/6 + M/360
(5) False

试题八
01代码行修改结果:class Stock{
02代码行修改结果:{
06代码行修改结果:public Stock (){getData();}
07代码行修改结果:public Stock (int n,doublepr){
程序运行的输出结果为:
0∶0.0 1∶67.5