You are on page 1of 13

2000-CE

COMP STUD

PAPER IA

HONG KONG EXAMINATION AND ASSESSMENT AUTHORITY


HONG KONG CERTIFICATE OF EDUCATION EXAMINATION 2000

COMPUTER STUDIES PAPER I Section A (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.

2000-CE-COMP STUD 1A-1 (C Version)


There are 50 questions in this section. A. 1110 1010
B. 1010 1010
1. Which of the following statements does NOT comply with C. 0101 0101
the Personal Data (Privacy) Ordiance? D. 1101 0101
E. 1010 1011
A. Personal information cannot be changed without
authorization. 6. Which of the following software can be used to create a
B. Personal information is kept up-to-date. data file for mail-merging?
C. Personal information is not disclosed to
unauthorized parties. (1) Spreadsheet
D. Personal information is kept longer than (2) Word processing
necessary. (3) Graphics
E. Personal information is used for a specified (4) Database
purpose. A. (4) only
B. (1) and (4) only
2. Which of the following is considered a computer crime? C. (2) and (3) only
D. (2) and (4) only
A. Selling “Freeware” downloaded from the E. (1), (2) and (4) only
Internet
B. Download “Freeware” from the Internet 7. Which of the following area(s) is/are (an) application(s) of
C. Using a computer in a public library to log onto computer graphics?
the Internet
D. Making a fund transfer through the Internet (1) Computer Aided Design
E. Backup up data files downloaded from the (2) Computer Animation
Internet (3) Computer Assisted Learning
A. (1) only
3. The following diagram shows a queue containing five B. (2) only
items: C. (1) and (2) only
D. (2) and (3) only
C T U X B E. (1), (2) and (3) only
Front Rear 8. Which of the following mode of processing systems can
Which of the following diagrams shows the queue after respond quickly to some external events?
the deletion of two items and the insertion of three items P,
Q and F? A. Time sharing
B. Batch
A. C T U P Q F C. Real time
D. Multitasking
B. U X B P Q E. Interactive
C. U X B P Q F
9. Records in a random file are stored…
D. C T U X B P Q F
E. P Q F U X B A. in a location assigned by an addressing
algorithm.
B. in a location assigned by a random number
4. Given three two’s complement 8-bit integers X, Y and Z generator.
such that Z = X + Y, where Y is the one’s complement of C. in any empty location.
X. What is the value of Z in decimal? D. in the order of input.
E. in the order of the key.
A. -127
B. -1
C. 0
D. 255
E. 127

5. In the following diagram, bits 1 to 7 are used to store the


ASCII code of a character and bit 0 is the odd parity bit.

7 6 5 4 3 2 1 0 bit number


parity bit
Which of the following bit patterns represents the
character ‘U’?

2000-CE-COMP STUD 1A-2 (C Version)


(1) Random Access Memory
10. Which of the following networks is a star network? (2) Hard Disk
(3) Magnetic Tape Drive
A. B. Arrange these in term of access speed, from the slowest to
the fastest

A. (3), (2), (1)


B. (2), (1), (3)
C. (1), (3), (2)
C. D. D. (2), (3), (1)
E. (1), (2), (3)

16. The following shows part of the contents of the memory:

Memory Location Memory Content


E. 120 140
130 150
140 160
150 170
160 180
The final content of the accumulator is found to be 150 if
the following three instructions are executed sequentially.
11. Which of the following data transmission media is NOT What will the value of at memory locations 130, 140, 150
subject to electrical interference? respectively?

A. Twisted pair wire Instruction(s) Meaning


B. Coaxial cable MOV 150, A Copy the value of 150 into
C. Optical fiber the accumulator.
D. Radio MOV A, &150 Copy the content of the
E. None of the above accumulator into memory
location 150.
12. The function(s) of the Control Unit is/are MOV &150, &130 Copy the contents of the
memory location 150 into
(1) to interpret the instructions the memory location 130.
(2) to direct all operations within the A. 150 160 170
processor B. 150 160 0
(3) to send and receive control signals from C. 170 160 0
peripheral devices D. 150 160 150
A. (2) only E. 170 160 150
B. (3) only (This item was deleted.)
C. (1) and (2) only
D. (2) and (3) only 17. Which of the following is/are true about a laser printer?
E. (1), (2) and (3)
(1) It outputs high-quality hard copy.
13. Which of the following is NOT a register inside the CPU? (2) It is an impact printer.
(3) It operates quietly.
A. Status register A. (1) only
B. Instruction register B. (2) only
C. Program counter C. (1) and (3) only
D. Accumulator D. (2) and (3) only
E. RAM E. (1), (2) and (3)
14. Which of the following peripherals are output devices?

(1) Plotter
(2) CD-ROM Drive
(3) Scanner
(4) Hard Disk Drive
A. (1) and (2) only
B. (2) and (4) only
C. (1) and (3) only
D. (1) and (4) only
E. (3) and (4) only

15. Below are 3 storage media:

2000-CE-COMP STUD 1A-3 (C Version)


(1) Peter downloaded a shareware from the
18. Which of the following will affect the output quality of a Internet and continued to use it after the
visual display unit? free trial period.
(2) When Mary submitted her assignment to
(1) Number of colours her teacher via the network, the teacher’s
(2) Resolution computer became infected.
(3) Memory size (3) Tom sold pirated software.
A. (1) only A. (3) only
B. (1) and (2) only B. (1) and (3) only
C. (1) and (3) only C. (1) and (2) only
D. (2) and (3) only D. (2) and (3) only
E. (1), (2) and (3) E. (1), (2) and (3)

19. People can work at home using a home computer 24. Which of the following about a stack is/are true?
connected to the computer in their office. Which of the
following is false? (1) It is a first-in-first-out data structure.
(2) Two pointers are required for a stack
A. It provides a relax working atmosphere. operation.
B. There is better team spirit. (3) It can be used to store returning addresses
C. There is possible family distraction. for procedure calls in a program
D. Less office space is needed. A. (1) only
E. It allows flexible working hours. B. (2) only
C. (3) only
20. Which of the following is NOT normally sold as part of an D. (1) and (2) only
office automation software package? E. (1) and (3) only

A. User’s manual 25. The decimal number 3.375 in binary normalized form is
B. Operation guide
C. Tutorial manual A. 0.11011  1010
D. Program listing B. 0.11011  10-10
E. Trouble shooting manual C. 11011  1011
D. 11011  10-11
21. In stages of computerization, the person mainly E. 1.1011  1001
responsible for producing the system flowchart is the
. 26. Using 13-bit, 2’s complement representation, what is the
result of –513 – 512?
A. electronic data processing manager
B. system analyst A. 1000000000001
C. systems engineer B. 1101111111111
D. programmer C. 0111111111111
E. computer operator D. underflow occurs
E. overflow occurs
22. The following steps are supposed to sum the integers of 1
to 9 and store the result in Y. 27. Which of the following tasks can be performed by a
database management system?
Step 1 assign 1 to X
Step 2 if X > 9 then go to step 6 (1) listing customers who used mobile phone
Step 3 assign the value of (Y + X) to Y for more than 100 minutes in last month
Step 4 assign the value of (X + 1) to X (2) sorting students’ marks in descending
Step 5 go to step 2 order
Step 6 output the value of Y (3) producing invitation letters to customers
Execution of the above steps cannot get the correct A. (1) only
answer. Which of the followings is the possible reason for B. (3) only
the error? C. (1) and (2) only
D. (2) and (3) only
A. Variable X is not initialized. E. (1), (2) and (3)
B. Variable Y is not initialized.
C. There is an infinite loop.
D. The value of X is not output.
E. Step 3 and Step 4 are misplaced.

23. Which of the following is/are example(s) of the


infringement of copyright?

2000-CE-COMP STUD 1A-4 (C Version)


A. (1) only
28. Which of the following tasks can be performed by a B. (2) only
spreadsheet software? C. (3) only
D. (1) and (2) only
(1) seeing how different interest rates will E. (1) and (3) only
affect the monthly repayment of mortgage
loans 32. In a school, Name, Class, Class_no are three fields in
(2) plotting charts of weekly temperatures a file used to store student names, classes and class
(3) analyzing the test marks of students numbers respectively. Which of the following can be used
A. (1) only as the key field?
B. (3) only
C. (1) and (2) only A. Name
D. (2) and (3) only B. Class_no
E. (1), (2) and (3) C. Class and Name
D. Class and Class_no
29. Which of the following is/are the advantage(s) of real-time E. Class_no and Name
processing over batch processing?
33. To avoid network failure caused by the malfunction of a
(1) It is easier to set up the system. node in a network, which of the following network
(2) The hardware is cheaper. topologies should be implemented?
(3) The information is more up-to-date.
A. (1) only (1) Ring
B. (2) only (2) Bus
C. (3) only (3) Star
D. (1) and (3) only A. (1) only
E. (2) and (3) only B. (1) and (2) only
C. (1) and (3) only
30. Which of the following tasks should be accomplished D. (2) and (3) only
using an interactive system? E. (1), (2) and (3)

(1) withdrawing money from a bank account 34. Which of the following is/are the duties of a computer
through an automatic teller machine operator?
(2) sending bank statements to customers
(3) booking airline tickets (1) mounting disks
A. (1) only (2) backing up data
B. (2) only (3) collecting and entering data
C. (3) only A. (1) only
D. (1) and (2) only B. (2) only
E. (1) and (3) only C. (1) and (2) only
D. (2) and (3) only
31. A company uses a sequential file to store the records of its E. (1), (2) and (3)
employees. Which of the following statements is/are true?
35. Which of the following techniques can be used during
(1) An employee’s record can be located algorithm design?
using a sequential search.
(2) An employee’s record can be located A. decomposing the problem
using a binary search. B. documenting the program
(3) An employee’s record can be located C. defining the problem
directly. D. coding the program
E. debugging the program

2000-CE-COMP STUD 1A-5 (C Version)


For questions 36 to 45, find the output of the given program.

36. #include <stdio.h>

int main()
{
printf("%d\n", (int) ((abs(-9.5) - 2.0) / 2));
}

A. 0
B. 1
C. 2
D. 3
E. 4

37. #include <stdio.h>

int main()
{
char a[10], b[10], x[10], y[10], z[10];

strcpy(x, "10101010");
strcpy(y, "10101");
strcpy(z, x);
strcat(z, y);
strncpy(a, z + 1, 3);
a[3] = '\0';
strncpy(b, z + 4, 2);
b[2] = '\0';
strcat(a, b);
printf("%s\n", a);
}

A. 00100
B. 01010
C. 01011
D. 01101
E. 01110

38. #include <stdio.h>

int main()
{
const int k = 8;
char s[k];
int i;

strcpy(s, "legco");
switch ( s[k - strlen(s) - 2] )
{
case 'o' : i = 2; break;
case 'c' : i = 4; break;
case 'g' : i = 6; break;
case 'e' : i = 8; break;
case 'l' : i = 10; break;
default: i = 5;
}
printf("%d\n", i % (k - 1));
}

A. 0
B. 1
C. 2
D. 3
E. 4

2000-CE-COMP STUD 1A-6 (C Version)


39. #include <stdio.h>

void change(int x, int y, int z)


{
x = y;
y = z;
printf("%d%d%d\n", x, y, z);
}

int main()
{
int x, y, z;

x = 1;
y = 2;
z = 3;
change(y, z, x);
printf("%d%d%d\n", x, y, z);
}

A. 231
123
B. 233
123
C. 311
123
D. 231
231
E. 311
311

40. #include <stdio.h>

int main()
{
int data[7];
int k;

for ( k = 1; k <= 6; k++ )


data[k] = 7 - k;
k = data[data[k - 2]];
printf("%d\n", data[data[k] * k - data[3]] + data[k]);
}

A. 3
B. 6
C. 8
D. 11
E. 12

2000-CE-COMP STUD 1A-7 (C Version)


41. #include <stdio.h>

int main()
{
int i, j;

i = 2;
for ( j = 3; j >= 0; j-- )
{
i = i + j;
printf("%d", i);
}
}

A. 543
B. 578
C. 5432
D. 5433
E. 5788

42. #include <stdio.h>

char a[] = "greater", b[] = "less";

int GREAT(char x[], char y[])


{
if ( strlen(a) > strlen(b) )
return strlen(a);
else
return strlen(b);
}

int main()
{
printf("%d\n", GREAT(a, b) + GREAT(b, a));
}

A. 8
B. 11
C. 14
D. 74
E. 77

2000-CE-COMP STUD 1A-8 (C Version)


43. #include <stdio.h>

typedef struct
{
int a;
char b;
} link;

int main()
{
int i;
link x[10];

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


{
x[i].a = 11 % (i + 1);
x[i].b = (char) (90 - i);
}
for ( i = 0; i < 10; i++ )
if ( x[i].a < 3 )
printf("%c", x[i].b);
}

A. ZY
B. ZYXV
C. ZYXVR
D. ZYXVRQ
E. ZYXVURQ

44. (This question involves features available in Pascal but not in C. So it is not possible to re-write the program in C).

45. #include <stdio.h>

typedef struct
{
char x;
int y;
int z;
} rec;

int main()
{
rec r;

r.x = 'L';
r.y = (int) sqrt((float) r.x) + 1;
r.z = ((int) r.x) % r.y;
printf("%d\n", r.z);
}

A. 4
B. 5
C. 6
D. 7
E. 8

2000-CE-COMP STUD 1A-9 (C Version)


Direcitons: Questions 46 – 50 consist of two statements each. Decide whether each of the two statements is true or false. If both
are true, decide whether or not the second statement is a correct explanation of the first statement. Then select one of
options A – E according to the following table:

1st statement 2nd statement


A. true true the 2nd statement is a correct explanation of the 1st statement
B. true true the 2nd statement is not a correct explanation of the 1st statement
C. true false -
D. false true -
E. false false -

1st statement 2nd statement

46. Multimedia files must be compressed before saving to Rewritable CD are suitable media for storing
the mass storage media. multimedia files.

47. In a microcomputer, the number of bytes required to Chinese character can be inputted by a combination of
store a Chinese character is more than an English keys on a keyboard.
character.

48. Compression can improve file security. A compressed file cannot be viewed using software
which originally created the uncompressed file.

49. An object program is free of syntax errors. A compiler can be used to detect all errors in a source
program.

50. A machine code program is generally difficult for A machine code program cannot include comment
people to read. statements.

2000-CE-COMP STUD 1A-10 (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

2000-CE-COMP STUD 1A-11 (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

2000-CE-COMP STUD 1A-12 (C Version)


Question No. Key Question No. Key

1. D 26. B
2. A 27. E
3. C 28. E
4. B 29. C
5. E 30. E

6. E 31. A
7. E 32. D
8. C 33. D
9. A 34. C
10. C 35. A

11. C 36. D
12. E 37. B
13. E 38. B
14. D 39. C
15. A 40. A

16. deleted 41. E


17. C 42. C
18. E 43. D
19. B 44. D
20. D 45. A

21. B 46. D
22. B 47. B
23. B 48. D
24. C 49. C
25. A 50. A

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

2000-CE-COMP STUD 1A-13 (C Version)

You might also like