2007上半年程序员级试题答案
上午标准答案(每空1分)
(1) | B | (16) | B | (31) | D | (46) | B | (61) | A |
(2) | A | (17) | D | (32) | A | (47) | B | (62) | D |
(3) | B | (18) | B | (33) | C | (48) | D | (63) | B |
(4) | A | (19) | A | (34) | D | (49) | A | (64) | C |
(5) | D | (20) | D | (35) | B | (50) | C | (65) | D |
(6) | B | (21) | D | (36) | C | (51) | C | (66) | B |
(7) | B | (22) | C | (37) | D | (52) | B | (67) | D |
(8) | C | (23) | C | (38) | A | (53) | D | (68) | B |
(9) | B | (24) | D | (39) | A | (54) | A | (69) | A |
(10) | C | (25) | C | (40) | B | (55) | B | (70) | B |
(11) | A | (26) | B | (41) | D | (56) | C | (71) | D |
(12) | D | (27) | C | (42) | C | (57) | D | (72) | B |
(13) | D | (28) | A | (43) | B | (58) | D | (73) | D |
(14) | B | (29) | A | (44) | C | (59) | C | (74) | C |
(15) | B | (30) | B | (45) | A | (60) | C | (75) | A |
下午参考答案
试题一
【问题1】
(1)(11-I)*a[I]
(2) 9
(3) S+(11-I)*a[I]->S
(4) (11-R)%11
【问题2】9
试题二
错误1:变量k没有声明
错误2:变量num没有初始化,或者num应初始化为0
错误3:第10行scanf 函数参数错
错误4:第13行循环条件错
错误5:第14行if语句条件错,或者将"="改为"=="
试题三
(1) years--
(2) 12 - r.month
(3) &r
(4) months--
(5) years * 12
试题四
(1) ptr ->next
(2) head ->next
(3) ptr != endptr
(4) ptr
(5) preptr
试题五
(1) form Users
(2)Adodc1.Recordset("UserID")
(3) txtUserID.Text
(4) txtPassword.Text = pwd
(5) frmApp.Show
【问题1】
(1) Stock():shares(1),share_val(1)
(2) cout
【问题2】
错误1:第4行,修改为:public:
错误2:第9行,修改为:~Stock(){}
【问题3】
否,或不存在内存泄漏
试题七
(1) True
(2) GreenT = GreenT - 1
(3) Call LoadNumber(40)
(4) N/10
(5) N -i*10
试题八
【问题1】
错误1:第1行,修改为: class Stock{
错误2:第2行,修改为: {
错误3:第4行,修改为: share_val = 0;
错误4:第7行,修改为: public Stock(int n ,int pr){
【问题2】
(1) new Stock()
转载于:https://blog.51cto.com/liaosy/1214191