Вы находитесь на странице: 1из 14

2003-CE

COMP STUD

PAPER II

HONG KONG EXAMINATION AND ASSESSMENT AUTHORITY


HONG KONG CERTIFICATE OF EDUCATION EXAMINATION 2003

COMPUTER STUDIES PAPER 2 (C Version)


Question Book

11:15 am – 12:15 am (1 hour)

Instructions:

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 questions are there. Look for the words ‘END OF
PAPER’ after the last question.

3. All questions carry equal marks.

4. ANSWER ALL QUESTIONS. You should mark all your answers on the 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.

2003-CE-COMP STUD 2-1 (C Version)


There are 50 questions in this paper. Choose the most suitable answer.

1. Which of the following is not a good reason to use robotics in the manufacturing industry?

A. Robots can replace all the employees.


B. Robots can work in a dangerous environment.
C. Robots can follow the manufacturing procedures accurately.
D. Robots can work 24 hours per day and 7 days per week.

2. Which of the following can be found in a washing machine?

(1) embedded system


(2) computer-assisted instruction
(3) artificial intelligence
A. (2) only
B. (1) and (2) only
C. (1) and (3) only
D. (1), (2) and (3)

3. Which of the following media can be used in wireless communication?

A. optical fiber
B. microwave
C. coaxial cable
D. twisted pairs

4. Which of the following statements describes an advantage of having variable-length records in a data file?

A. It is easy to sort the records.


B. It is easy to estimate the storage size of the data file.
C. Less storage space is needed.
D. It is easy to locate a record.

5. X is a data communication network connecting computers and peripherals within a building , while Y is a data
communication network covering a relatively large geographical area.

What are X and Y?

X Y
A. LAN WAN
B. WAN Internet
C. Internet LAN
D. WAN LAN

6. Which of the following fields in a student report system cannot be validated by range check?

A. age
B. student name
C. conduct grade
D. examination score

7. Which of the following is not an example of an interactive system?

A. locating places on a campus map


B. buying cinema tickets
C. marking multiple-choice systems
D. booking library resources

2003-CE-COMP STUD 2-2 (C Version)


8. In a department store, many data entry clerks will enter data into a system at the same time. The system will then process the
data at the end of each week. Which of the following best describes the system?

A. real time processing


B. multi-user and batch processing
C. multi-user and real time processing
D. interactive processing

9. Consider the following worksheet in a spreadsheet package:

A B C D
1 Chinese English Mathematics
2 Ann 78 72 84
3 David 66 86 98
4 John 89 54 60
5
If cell B5 stores the formula MAX(B2:B4) and this formula is then copied to D5, what will be the result of cell D5?

A. 60
B. 66
C. 89
D. 98

10. Which of the following drawing tool functions can be used to modify Diagram A to Diagram B?

Diagram A Diagram B
A. rotate
B. flip vertical
C. cut
D. flip horizontal

11. Which of the following software packages is the best option for maintaining the inventory of a department store?

A. spreadsheet package
B. word processing package
C. database management system
D. graphics package

12. Which of the following actions must be done before sending an electronic mail?

A. Enter an electronic mail address of the receiver


B. Save the mail
C. Attach a file to the mail
D. Scan the mail for viruses

13. With a graphical user interface, which of the following can be represented by an icon?

(1) a program file


(2) a spreadsheet file
(3) a video file
A. (1) only
B. (2) and (3) only
C. (1) and (3) only
D. (1), (2) and (3)

14. Peter uses three functions of a word processing package to edit the document below.

2003-CE-COMP STUD 2-3 (C Version)


Sports Sports
I love playing volleyball, I love playing
basketball and soccer very
much! volleyball,
basketball and
soccer very much!
Original document Document after editing
Which of the following functions is not used by Peter?

A. line spacing
B. font type
C. justification
D. underline

15. In a database file, data may be lost if

A. the field type of a field is changed from integer to character


B. an extra field is inserted
C. a field name is shortened
D. the field width of a field is reduced

16. Which of the following are the correct ways to search for information by using search engines?

(1) Try different search engines until the required information is found.
(2) Enter keyword(s) to search.
(3) Select directory(ies) provided by the search engine to search.
A. (1) and (3) only
B. (1) and (2) only
C. (2) and (3) only
D. (1), (2) and (3)

17. Which of the following electronic communication cannot transfer audio messages?

A. electronic mail
B. teleconferencing
C. fax
D. video on demand

18. A computer virus is a file.

A. text
B. database
C. graphic
D. program

19. When you buy a common application software, it basically implies

(1) you have the right to use the package


(2) you have the right to rewrite the package
(3) you have the right to make a copy of the package for someone
A. (1) only
B. (2) only
C. (3) only
D. (1) and (3) only

2003-CE-COMP STUD 2-4 (C Version)


20. Which of the following actions can prevent the computer from virus infections?

(1) Do not open electronic mail attachments from unknown senders.


(2) Delete all read electronic mail in the computer.
(3) Uninstall all active programs downloaded from the Internet.
A. (1) only
B. (2) only
C. (1) and (3) only
D. (2) and (3) only

21. Which of the following factors is most closely related to the processing speed of a computer?

A. the number of peripheral devices connected to the CPU


B. the physical size of the CPU
C. the number of registers in the CPU
D. the number of instructions the CPU can execute per second

22. Which of the following is not hardware?

A. modem
B. floppy disk drive
C. scanner driver
D. printer

23. Roughly speaking, there are 10,000 frequently used Chinese characters and 30,000 non-frequently used Chinese characters.
What is the least number of bits required to represent a Chinese character?

A. 13
B. 14
C. 15
D. 16

24. Mr. Wong wants to make a full backup of a file server daily. Which of the following storage media should he use?

A. floppy disk
B. compact disc recordable (CDR)
C. hard copy
D. magnetic tape

25. Which of the following statements about compact disc rewritable (CDRW) is/are correct?

(1) Users cannot update the contents.


(2) It is a volatile memory.
(3) It can store a large number of graphic files.
A. (2) only
B. (3) only
C. (1) and (2) only
D. (2) and (3) only

2003-CE-COMP STUD 2-5 (C Version)


26. Consider the data in the figure below:

Which of the following devices can be used to input the data in the figure above?

(1) optical character reader


(2) optical mark reader
(3) bar code reader
A. (1) only
B. (2) only
C. (3) only
D. (1) and (2) only

27. If integers are represented in 2’s complement form in 10-bit binary codes, which of the following operations will cause
overflow error?

A. 400 + 112
B. -400 + 112
C. 400 – 112
D. -400 – 112

28. Which of the following is the sequence of actions taking place when an instruction is executed by a CPU?

(1) Fetch an instruction from main memory.


(2) Execute the instruction.
(3) PC is automatically increased by 1.
(4) Decode the instruction.
A. (1)  (4)  (3)  (2)
B. (4)  (3)  (1)  (2)
C. (1)  (3)  (4)  (2)
D. (1)  (3)  (2)  (2)

29. The Instruction Register (IR) holds the .

A. current instruction
B. next instruction
C. address of the current instruction
D. address of the next instruction

30. Which of the following are high level programming languages?

(1) Pascal
(2) Assembly language
(3) COBOL
(4) Machine language
A. (1) and (2) only
B. (1) and (3) only
C. (2) and (4) only
D. (3) and (4) only

31. Which of the following is not an advantage of using modular approach in writing programs?

A. Program logic is simpler.


B. Program design is clearer.
C. Program maintenance is easier.
D. Program execution is faster.

32. Which of the following tasks is not usually performed by a point-of-sale terminal?

2003-CE-COMP STUD 2-6 (C Version)


A. cash payment
B. display of product information
C. bill printing
D. record of customers’ complaints

33. Floating-point representation is usually used instead of fixed-point representation in the representation of numerical data in
computers because of .

A. wider range of numbers represented


B. no overflow errors
C. no truncation errors
D. no sign bits

34. Which of the following registers are closely related to the main memory?

(1) IR
(2) MAR
(3) ACC
(4) MDR
A. (1) and (3) only
B. (2) and (4) only
C. (1), (2) and (3) only
D. (2), (3) and (4) only

35. The diagram below shows the relationship between end users and a computer.

end users

X

Y

Z
Which should be X, Y and Z?

X Y Z
A. application software operating system hardware
B. application software hardware operating system
C. operating system hardware application software
D. operating system application software operating system

36. Which of the following can control the access of files?

(1) Change the files to be read-only.


(2) Restrict access to the files using a password system.
(3) Keep the backup of the files in a safe place.
A. (2) and (3) only
B. (1) and (2) only
C. (1) and (3) only
D. (1), (2) and (3)

37. Which of the following is not an operating system?

A. UNIX
B. LINUX
C. JAVA
D. DOS

38. During compilation, Programming Language A will be compiled into Programming Language B.

Programming
compilation Programming
Language A Language B

2003-CE-COMP STUD 2-7 (C Version)


Which of the following are the reasons for using programming language A instead of programming language B in writing
programs?

(1) Execution time will be shorter.


(2) Less program statements will be written.
(3) Memory locations can be accessed directly.
(4) It is easier to learn and write.
A. (1) and (3) only
B. (1) and (4) only
C. (2) and (4) only
D. (3) and (4) only

39. Which of the following statements about pseudocode is/are correct?

(1) CPU can understand pseudocode directly.


(2) Pseudocode can be rewritten into program instruction.
(3) Pseudocode has no particular syntax rules.
A. (2) only
B. (2) and (3) only
C. (1) and (2) only
D. (1) and (3) only

40. If a teacher wants to enter examination marks of students from a score document into a computer, which of the following
statements about data verification is not correct?

A. The teacher types the marks twice to check if there is any difference or not.
B. The teacher types the marks once and another teacher repeats the task to check if there is any difference or not.
C. The teacher types the marks once and checks the printout against the marks displayed on the screen.
D. The teacher types the marks once and checks the printout against the source document.

For questions 41-50, find the output of the given program.

41. int main()


{
int a, b, c;

a = (int) sqrt(1227.0);
b = 34 / 7;
c = a % b * 2;
printf("%d\n", c);
}

A. 2
B. 4
C. 6
D. 8

2003-CE-COMP STUD 2-8 (C Version)


42. int main()
{
int a[15];
int i;

a[0] = 1;
for ( i = 1; i < 15; i++ )
a[i] = a[i - 1] + (i + 1) * (i + 1);
printf("%d\n", a[3]);
}

A. 10
B. 14
C. 30
D. 55

43. int main()


{
int a[2][5];
int i, j;

for ( i = 0; i < 2; i++ )


for ( j = 0; j < 5; j++ )
if ( i == 0 )
a[i][j] = (j + 1) * 4;
else
a[i][j] = (j + 1) * 5;
printf("%d\n", a[0][2] + a[1][3]);
}

A. 7
B. 9
C. 14
D. 32

44. int main()


{
char x, y;

x = 'K';
switch ( x / 10 )
{
case 6:
y = x + 2;
break;
case 7:
y = x + 3;
break;
case 8:
y = x + 1;
break;
case 9:
y = x - 3;
break;
}
printf("%c\n", y);
}

A. N
B. M
C. L
D. J

2003-CE-COMP STUD 2-9 (C Version)


45. int main()
{
int x, y;

x = 0;
y = 3;
while ( x < 4 )
if ( y > 0 )
{
y = y - 1;
x = x + 2;
}
printf("%d\n", x + y);
}

A. 3
B. 4
C. 5
D. 6

46. void cal(int* a, int b)


{
*a = *a + 3;
b = b + *a;
printf("%d%d", *a, b);
}

int main()
{
int x, y;
x = 4;
y = 5;
cal(&x, y);
printf("%d%d\n", x, y);
}

A. 71245
B. 71275
C. 7945
D. 712712

47. int main()


{
char s[] = "abcdefgh";
char s2[9];

strncpy(s2, s + strlen(s) - 6, 3);


s2[3] = '\0';
printf("%s\n", s2);
}

A. abc
B. cde
C. abcde
D. cdefg

2003-CE-COMP STUD 2-10 (C Version)


48. int main()
{
int k, m, n;

m = 10;
n = 4;
k = m + 1;
do
{
m = 2 * n - 1;
n = n - 1;
k = m;
} while ( !(m == 0 || n == 0) );
printf("%d%d%d\n", k, m, n);
}

A. 011
B. 101
C. 110
D. 001

49. int main()


{
int x, y, z;

x = 3;
y = 7;
z = y - x;
if ( z <= 4 && x > 3 )
printf("%d%d%d\n", x, y, z);
else
printf("%d%d%d\n", z, y, x);
}

A. 347
B. 374
C. 447
D. 473

50. int main()


{
int i;
int n[10];

for ( i = 0; i < 10; i++ )


n[i] = (i + 1) * 2 + 1;
if ( n[2] + n[3] > n[4] )
if ( n[0] * 10 > n[4] )
n[9] = 10;
else
n[9] = 11;
else
n[9] = 12;
printf("%d\n", n[9]);
}

A. 10
B. 11
C. 12
D. 21

2003-CE-COMP STUD 2-11 (C Version)


A Partial Character List for ASCII

Character ASCII Character ASCII Character ASCII


0 48 J 74 d 100
1 49 K 75 e 101
2 50 L 76 f 102
3 51 M 77 g 103
4 52 N 78 h 104
5 53 O 79 I 105
6 54 P 80 j 106
7 55 Q 81 k 107
8 56 R 82 l 108
9 57 S 83 m 109
: 58 T 84 n 110
; 59 U 85 o 111
< 60 V 86 p 112
= 61 W 87 q 113
> 62 X 88 r 114
? 63 Y 89 s 115
@ 64 Z 90 t 116
A 65 [ 91 u 117
B 66 \ 92 v 118
C 67 ] 93 w 119
D 68 ^ 94 x 120
E 69 _ 95 y 121
F 70 ` 96 z 122
G 71 a 97 { 123
H 72 b 98 | 124
I 73 c 99 } 125

List of Operators and Reserved Words (C)

#include, +, -, *, /, ++, --, +=, -=, *=, /=, %=, ==, %, >, <, =, >=, <=, !=, &&, ||, !, sqrt, rand, abs, strcat, strncat, strlen,
atoi, strcpy, strncpy, const, void, return, int, float, char, \0, strcmp, strncmp, true, false, FILE, main, /*…*/, if…else, for,
while, do…while, switch…case…break, break, continue, scanf, printf (%d, %f, %c, %s), \n, \t, fopen, getc, fgets, putc,
fputs, EOF, fclose

2003-CE-COMP STUD 2-12 (C Version)


Appendix

Lists of Commands in Mnemonics

Op-code Operand Meaning


INP XXX input data to address XXX
OUT XXX output the contents of address XXX
STA XXX store the contents of accumulator to address XXX
LDA XXX load accumulator with the contents of address XXX
JMP XXX jump to address XXX
JPN XXX branch to address XXX if the contents of accumulator are negative
JPZ XXX branch to address XXX if the contents of accumulator are zero
INC XXX increase the contents of address XXX by 1
DEC XXX decrease the contents of address XXX by 1
ADD XXX add to accumulator the contents of address XXX and store the result in
accumulator
SUB XXX subtract from accumulator the contents of address XXX and store the result
in accumulator
STP - stop

2003-CE-COMP STUD 2-13 (C Version)


Question No. Key Question No. Key

1. A (85) 26. A (54)


2. * 27. A (51)
3. B (87) 28. C (56)
4. C (51) 29. A (47)
5. A (72) 30. B (80)

6. B (80) 31. D (54)


7. C (64) 32. D (82)
8. B (87) 33. A (65)
9. D (68) 34. B (51)
10. A (62) 35. A (47)

11. C (80) 36. B (60)


12. A (96) 37. C (67)
13. D (63) 38. C (61)
14. C (76) 39. B (37)
15. D (45) 40. C (72)

16. D (55) 41. C (74)


17. C (88) 42. C (79)
18. D (91) 43. D (80)
19. A (95) 44. A (75)
20. A (69) 45. C (53)

21. D (82) 46. B (36)


22. C (79) 47. B (73)
23. D (64) 48. C (61)
24. D (41) 49. D (87)
25. B (61) 50. A (73)

Note: Figures in brackets indicate the percentage of candidates choosing the correct answers.

2003-CE-COMP STUD 2-14 (C Version)

Вам также может понравиться