2002-CE COMP STUD PAPER 2
HONG KONG EXAMINATIONS AUTHORITY HONG KONG CERTIFICATE OF EDUCATION EXAMINATION 2002
COMPUTER STUDIES
PAPER 2 Subject Code
11.15 am – 12.15 pm (1 hour)
200
1.
Read carefully the instructions on the Answer Sheet and insert the information required (including the Subject Code) in the spaces provided.
2.
When told to open this book, you should check that all the questions are there. Look for the words ‘END OF PAPER’ after the last question.
3.
All questions carry equal marks.
4.
ANSWER ALL QUESTIONS. Answer Sheet.
5.
You should mark only ONE answer for each question. If you mark more than one answer, you will receive NO MARKS for that question.
6.
No marks will be deducted for wrong answers.
香 港 考 試 局
保留版權 Hong Kong Examinations Authority All Rights Reserved 2002
2002-CE-COMP STUD 2–1
You should mark all your answers on the
There are 50 questions in this paper. 1.
Which of the following are commonly used in human-like robots? (1) (2) (3) (4) A. B. C. D.
2.
artificial intelligence image recognition computer programming speech synthesis
(2) and (4) only (1), (2) and (3) only (1), (3) and (4) only (1), (2), (3) and (4)
Which of the following is/are (an) example(s) of an electronic funds transfer system? (1) an electronic payroll transfer system (2) an electronic inventory system (3) an automatic teller machine A. B. C. D.
3.
Which of the following is NOT a use of computers in the farming industry? A. B. C. D.
4.
(1) only (1) and (2) only (2) and (3) only (1) and (3) only
retrieving weather information selling products through the Internet replacing all staff on farms monitoring machines on farms
In a hospital, ___________ can help doctors diagnose patients’ illnesses. A. B. C. D.
a robot an expert system an electronic funds transfer system a computer assisted instruction system
2002-CE-COMP STUD 2–2
−1−
保留版權 All Rights Reserved 2002
5.
Which of the following are disadvantages of having a computer network in a school? (1) (2) (3) (4) A. B. C. D.
6.
Data may be accessed by unauthorised persons. Computer viruses may spread more easily. File sharing is possible. A computer network requires two or more computers.
(1) and (2) only (2) and (3) only (3) and (4) only (1) and (4) only
In a school, a computer teacher stores educational TV programmes in a server. Students can choose any of the programmes to watch on the computers in a multimedia learning centre. Which of the following best describes the above? A. B. C. D.
7.
teleconferencing electronic mail dialup network video on demand
Below is part of a file MEMBER: name
class
student number
membership expiry date
Chan Tai Man
1A
15687
14/7/2003
Wong Li Li
2B
35984
15/7/2004
…
…
…
…
If MEMBER is to be updated using a transaction file TRANS, which of the following fields must be included in TRANS? A. B. C. D.
name class student number membership expiry date
2002-CE-COMP STUD 2–3
−2−
保留版權 All Rights Reserved 2002
Go on to the n e x t
8.
Which of the following is/are data verification? (1) (2) (3) (4) A. B. C. D.
9.
(3) only (1) and (2) only (1), (2) and (4) only (1), (3) and (4) only
Computer file protection and security involve (1) (2) (3) (4) A. B. C. D.
10.
backing up files putting backing store that holds files in a safe place keeping hard copies of files setting up a password system
(1) and (2) only (1), (2) and (4) only (1), (3) and (4) only (2), (3) and (4) only
Which of the following can be done to protect against data loss from hard disk failure? A. B. C. D.
11.
checking if the data is mistyped entering data twice by two different operators checking if the data is reasonable printing a hard copy for checking against the original data
data encryption read-only access control password protection file back-up and file generation
Which of the following is a characteristic of a multi-tasking system? A. B. C. D.
It must be a multi-user system. It allows a user to run several programs at the same time. It must be an off-line system. It requires a user’s immediate response.
2002-CE-COMP STUD 2–4
−3−
保留版權 All Rights Reserved 2002
12.
‘A data processing method whose input and output are interleaved, like a conversation, allows the user’s input to depend on earlier output from the same run.’ Which of the following best describes this data processing method? A. B. C. D.
13.
For a Sports Day, a file is used to store information about participating students and the events. Which of the following CANNOT be used as the key field? A. B. C. D.
14.
real-time processing on-line non-interactive processing on-line processing interactive processing
Hong Kong Identity Card Number student registration number class together with class number student name together with event
Consider the following worksheet in a spreadsheet package: 1 2 3 4 5 6
A Amount Interest Rate
B 10000 3%
Year 1 2
Interest 300 600
Cell B6 stores the product of B1, B2 and A6. If the formula stored in cell B6 is produced by copying the formula stored in cell B5, what should be the formula in cell B5? (A $ sign before any column letters or row numbers represents absolute addressing. Without the $ sign, relative addressing is used.) A. B. C. D.
B1*B2*A$5 B$1*B$2*A5 $B1*$B2*A5 B1*B2*$A5
2002-CE-COMP STUD 2–5
−4−
保留版權 All Rights Reserved 2002
Go on to the n e x t
15.
Which of the following are advantages of using electronic spreadsheets over manual spreadsheets? (1) Data format can be changed more easily. (2) Chart can be drawn more easily. (3) Calculation can be performed faster. A. B. C. D.
16.
(1) and (3) only (1) and (2) only (2) and (3) only (1), (2) and (3)
Which of the following are usually required to access the Internet at home? (1) (2) (3) (4) A. B. C. D.
17.
(1) and (3) only (1) and (4) only (2) and (3) only (2) and (4) only
In using a word processor, which of the following may affect the number of lines in a document? A. B. C. D.
18.
an Internet Service Provider (ISP) account an electronic mail account a modem a search engine
changing the margins of the document changing the line spacing changing the justification of the text underlining the text
Which of the following files can be attached to electronic mail? (1) graphics files (2) audio files (3) video files A. B. C. D.
(1) and (2) only (1) and (3) only (2) and (3) only (1), (2) and (3)
2002-CE-COMP STUD 2–6
−5−
保留版權 All Rights Reserved 2002
19.
Which of the following can be used in data communication? (1) twisted-pair wires (2) optical fibres (3) microwaves A. B. C. D.
20.
Which of the following software is commonly used to retrieve information on the Internet? A. B. C. D.
21.
(1) and (2) only (1) and (3) only (2) and (3) only (1), (2) and (3)
a browser a word processing package a spreadsheet package a graphics package
Mary has produced the following picture using a graphics package.
Which of the following drawing tool functions is the LEAST useful in producing the picture? A. B. C. D.
fill colour copy and paste flip lines
2002-CE-COMP STUD 2–7
−6−
保留版權 All Rights Reserved 2002
Go on to the n e x t
22.
P, Q, R and S are working in a company. Q, R and S want to know what is in P’s electronic mail account. One day, they did the following: (1) Q stole P’s electronic mail account password. (2) R logged into P’s electronic mail account. (3) S read the mail in P’s electronic mail account. Who has/have probably committed a computer crime? A. B. C. D.
23.
Peter is a _________ in an office. He provides first-hand support to staff for problems in operating computers. A. B. C. D.
24.
Q only Q and S only Q and R only Q, R and S
computer technician programmer system analyst network manager
Which of the following statements is INCORRECT? A. Random access memory (RAM) is volatile and so we need backing store to hold data permanently. B. Main memory is more costly than backing store. C. Read only memory (ROM) has to hold user programs so that the programs can be executed faster. D. Random access memory (RAM) can hold user programs so that the programs can be executed faster.
25.
Which of the following devices is used to read data on a credit card? A. B. C. D.
a magnetic ink character reader a magnetic strip card reader a bar code reader an image scanner
2002-CE-COMP STUD 2–8
−7−
保留版權 All Rights Reserved 2002
26.
Which of the following is the correct order of categories of computers from the highest computing power to the lowest? A. B. C. D.
27.
The main function of a Control Unit is to _____________________. A. B. C. D.
28.
scanner bar code reader touch screen graph plotter
David is unable to delete a file in a directory on a hard disk. Which of the following is a possible reason? A. B. C. D.
30.
perform arithmetic operations send out control signals perform logic operations store data
Mr. Cheung has found a good passage in a textbook. He wants to make a copy for reference using a computer. He needs a __________ and a printer. A. B. C. D.
29.
Supercomputer, Mainframe computer, Palm computer, Microcomputer Microcomputer, Minicomputer, Mainframe computer, Supercomputer Supercomputer, Mainframe computer, Microcomputer, Palm computer Mainframe computer, Microcomputer, Palm computer, Minicomputer
The file is in use. The hard disk is full. There is another copy of the file in another directory. The file size is very small.
Why are two bytes used to represent a Chinese character? A. Most Chinese characters are composed of two parts. B. The display size of a Chinese character on screen is usually twice that of an alphanumeric character. C. Two bytes have sufficient combinations to represent all Chinese characters. D. Some Chinese applications software is designed for 16-bit computers.
2002-CE-COMP STUD 2–9
−8−
保留版權 All Rights Reserved 2002
Go on to the n e x t
31.
In a certain computer system, each integer is stored in 6 bits using sign-and-magnitude representation. The range of the integers that can be stored is from __________________. A. B. C. D.
32.
Which of the following can be executed directly by the CPU of a computer? A. B. C. D.
33.
-6 to 6 -31 to 31 -32 to 31 -32 to 32
a Pascal program a BASIC program a machine code program an assembly language program
Which of the following about a compiler and an assembler is correct? A. They both take equal time to translate a program. B. They both translate high level language programs into machine code programs. C. They both generate a machine code program at the end of translation. D. They both translate one instruction at a time as the program is executed.
34.
The following diagram shows a computer operation.
Memory Unit
CPU
X
PC Register X represents ___________. A. B. C. D.
ACC IR MAR MDR
2002-CE-COMP STUD 2–10
−9−
保留版權 All Rights Reserved 2002
35.
Which of the following is a reason for using mnemonics to represent machine instructions? A. B. C. D.
36.
Which of the following about an operating system is INCORRECT? A. B. C. D.
37.
Programmers can understand the program more easily. The program runs faster. There are fewer instructions in the program. The program can be executed directly by the computer.
It is responsible for resource allocation of a computer system. It is an interface between a computer and its user. It can handle errors. A word processing package is an example of an operating system.
In a simple model computer, each instruction consists of a 3-bit operation code and a 5-bit operand. What is the maximum possible number of operation codes in the computer? operation code
A. B. C. D.
operand
3 5 8 32
2002-CE-COMP STUD 2–11
−10−
保留版權 All Rights Reserved 2002
Go on to the n e x t
38.
Below is an algorithm to swap the values stored in the variables A and B. Step 1: Step 2: Step 3:
assign the value of (A + B) to A assign the value of (A – B) to B assign the value of (A – B) to A
Which of the following is a limitation of the above algorithm? A. The values stored in variables A and B must not be zero. B. The values stored in variables A and B must not be of the string data type. C. A must be larger than B. D. B must be larger than A. 39.
Which of the following is NOT an advantage of using the modular approach in writing a large program? A. It allows a team of programmers to work together in writing the program. B. Modules can be reused in other programs. C. It is easier to modify and debug the program. D. There are fewer lines in the program.
40.
Which of the following about program documentation is INCORRECT? A. It aims to make the program easier to understand. B. It helps programmers modify the program in order to meet users’ changing requirements. C. It is completed before program coding. D. It involves meaningful identifier names and descriptive comments.
2002-CE-COMP STUD 2–12
−11−
保留版權 All Rights Reserved 2002
For questions 41-50, find the output of the given program. 41.
program p41; var x, y, z : integer; begin x := round(abs(-10.5)); y := 11 mod 4; z := x div 6 * y; writeln(z) end. A. B. C. D.
42.
-2 1 2 3
program p42; var N, X : integer; infile : text; begin assign(infile, 'sample.txt'); reset(infile); N := 0; while NOT eof(infile) do begin N := N + 1; read(infile, X) end; close(infile); writeln(N) end. The content of the file 'sample.txt' is as follows: 7 2 6 12 33 100 255 17<eof> <eof> represents the end-of-file character. A. B. C. D.
7 8 9 17
2002-CE-COMP STUD 2–13
−12−
保留版權 All Rights Reserved 2002
Go on to the n e x t
43.
program p43; var st1, st2 : string; i : integer; begin st1 := 'PQRST'; st2 := '123'; st1 := copy(st1+st2, length(st1), length(st2)); writeln(st1) end. A. B. C. D.
44.
ST123 RST12 T12 123
program p44; var sum, k, m : integer; begin sum := 0; for k := 4 downto 1 do for m := 1 to 5-k do sum := sum + 1; writeln(sum) end. A. B. C. D.
5 10 15 20
2002-CE-COMP STUD 2–14
−13−
保留版權 All Rights Reserved 2002
45.
program p45; var x, y, z : integer; begin x := 1; y := 2; z := 3; if (x >= y) or (y <= z) then begin x := y + z; y := x + y end else begin x := y – z; y := x – y end; writeln(x, y:4) end. A. B. C. D.
46.
1 5 -1 5
2 7 -3 3
program p46; var i, j, target : integer; N : array [1..10] of integer; begin N[1] := 1; for i := 2 to 10 do N[i] := N[i-1] + 5; j := 0; target := 20; repeat j := j + 1 until target <= N[j]; writeln(j) end. A. B. C. D.
4 5 6 7
2002-CE-COMP STUD 2–15
−14−
保留版權 All Rights Reserved 2002
Go on to the n e x t
47.
program p47; var col : char; row : integer; x : array['A'..'D', 1..5] of integer; begin for col := 'A' to 'D' do for row := 1 to 5 do begin x[col, row] := row; case col of 'B' : x[col, row] := x[col, row] * 'C' : x[col, row] := x[col, row] * 'D' : x[col, row] := x[col, row] * end end; writeln(x['A', 1], x['B', 2]:3, x['C', x['D', 4]:3) end. A. B. C. D.
1 2 3 1
2 4 6 4
3 6 9 9
4 8 12 16
2002-CE-COMP STUD 2–16
−15−
保留版權 All Rights Reserved 2002
2; 3; 4 3]:3,
48.
program p48; var i : integer; procedure S(p : integer); begin p := 1; write(p) end; begin i := 2; write(i); S(i); writeln(i) end. A. B. C. D.
49.
211 212 221 222
program p49; var x, y : integer; begin x := 2; y := 5; if x < 1 then if y > 4 then x := x – y else x := x – 3 else if y > 4 then x := x * 4 else x := x + 2; writeln(x) end. A. B. C. D.
-3 2 8 4
2002-CE-COMP STUD 2–17
−16−
保留版權 All Rights Reserved 2002
Go on to the n e x t
50.
program p50; var x, y : integer; flag : boolean; begin x := 7; y := 1; flag := TRUE; while (x > 0) AND FLAG do begin x := x – 2; y := y + 1; FLAG := x > y end; writeln(x:2, y:2) end. A. 3 B. 1 C. 0 D. -1
3 4 5 5
END OF PAPER
2002-CE-COMP STUD 2–18
−17−
保留版權 All Rights Reserved 2002
Character 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I
A Partial Character List for ASCII ASCII ASCII Character Character J d 48 74 K e 49 75 L f 50 76 M g 51 77 N h 52 78 O i 53 79 P j 54 80 Q k 55 81 R l 56 82 S m 57 83 T n 58 84 U o 59 85 V p 60 86 W q 61 87 X r 62 88 Y s 63 89 Z t 64 90 [ u 65 91 \ v 66 92 ] w 67 93 ^ x 68 94 _ y 69 95 ` z 70 96 a { 71 97 b | 72 98 c } 73 99
ASCII 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
List of Operators and Reserved Words +, -, *, /, div, mod, >, <, =, >=, <=, <>, and, or, not, sqrt, trunc, round, random, abs, +(string concatenation), length, ord, chr, val, str, copy, const, procedure, var, integer, real, char, string, boolean, true, false, text, array...of, program, input, output, begin...end, :=, for...to/downto...do, (*...*), if...then...else, while...do, repeat...until, case...of...end, write, writeln, read, readln, assign, reset, rewrite, eof, close
2002-CE-COMP STUD 2–19
−18−
保留版權 All Rights Reserved 2002
Appendix List of Commands in Mnemonics Op-code INP OUT STA LDA JMP JPN
Operand XXX XXX XXX XXX XXX XXX
JPZ
XXX
INC DEC ADD
XXX XXX XXX
SUB
XXX
STP
-
Meaning input data to address XXX output the contents of address XXX store the contents of accumulator to address XXX load accumulator with the contents of address XXX jump to address XXX branch to address XXX if the contents of accumulator are negative branch to address XXX if the contents of accumulator are zero increase the contents of address XXX by 1 decrease the contents of address XXX by 1 add to accumulator the contents of address XXX and store the result in accumulator subtract from accumulator the contents of address XXX and store the result in accumulator stop
2002-CE-COMP STUD 2–20
−19−
保留版權 All Rights Reserved 2002
2002 HKCE Computer Studies (Paper 2) Question No.
Key
Question No.
Key
1. 2. 3. 4. 5.
D (69) D (64) C (68) B (67) A (85)
26. 27. 28. 29. 30.
C (83) B (78) A (98) A (82) C (58)
6. 7. 8. 9. 10.
D (76) C (79) C (41) B (64) D (84)
31. 31. 33. 34. 35.
B (46) C (83) C (59) C (58) A (71)
11. 12. 13. 14. 15.
B (86) D (66) D (77) B (43) D (79)
36. 37. 38. 39. 40.
D (60) C (64) B (72) D (53) C (60)
16. 17. 18. 19. 20.
A (85) A (51) D (85) D (75) A (90)
41. 42. 43. 44. 45.
D (77) B (61) C (71) B (69) B (65)
21. 22. 23. 24. 25.
C (70) D (77) A (73) C (62) B (88)
46. 47. 48. 49. 50.
B (61) D (67) B (64) C (81) A (66)
Note: Figures in brackets indicate the percentages of candidates choosing the correct answers.
2002-CE-COMP STUD 2–21
−20−
保留版權 All Rights Reserved 2002