Académique Documents
Professionnel Documents
Culture Documents
COMP STUD
PAPER II
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.
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.
(1) artificial intelligence name class student number membership expiry date
Chan Tai Man 1A 15687 14/7/2003
(2) image recognition Wong Li Li 2B 35984 15/7/2004
(3) computer programming … … … …
(4) speech synthesis If MEMBER is to be updated using a transaction file
A. (2) and (4) only TRANS, which of the following fields must be included
B. (1), (2) and (3) only in TRANS?
C. (1), (3) and (4) only
D. (1), (2), (3) and (4) A. name
B. class
2. Which of the following is/are example(s) of an electronic C. student number
funds transfer system? D. membership expiry date
(1) an electronic payroll transfer system 8. Which of the following is/are data verification?
(2) an electronic inventory system
(3) an automatic teller machine (1) checking if the data is mistyped
A. (1) only (2) entering data twice by two different
B. (1) and (2) only operators
C. (2) and (3) only (3) checking if the data is reasonable
D. (1) and (3) only (4) printing a hard copy for checking
against the original data
3. Which of the following is NOT a use of computers in the A. (3) only
farming industry? B. (1) and (2) only
C. (1), (2) and (4) only
A. retrieving weather information D. (1), (3) and (4) only
B. selling products through the Internet
C. replacing all staff on farms 9. Computer file protection and security involve
D. monitoring machines on farms
(1) backup up files
4. In a hospital, can help doctors diagnose (2) putting backing store that holds files in
patients’ illness. a safe place
(3) keeping hard copies of files
A. a robot (4) setting up a password system
B. an expert system A. (1) and (2) only
C. an electronic funds transfer system B. (1), (2) and (4) only
D. a computer assisted instruction system C. (1), (3) and (4) only
D. (2), (3) and (4) only
5. Which of the following are disadvantages of having a
computer network in a school? 10. Which of the following can be done to protect against
data loss from hard disk failure?
(1) Data may be accessed by unauthorized
persons. A. data encryption
(2) Computer viruses may spread more B. read-only access control
easily. C. password protection
(3) File sharing is possible. D. file back-up and file generation
(4) A computer network requires two or
more computers. 11. Which of the following is a characteristic of a multi-
A. (1) and (2) only tasking system?
B. (2) and (3) only
C. (3) and (4) only A. It must be a multi-user system.
D. (1) and (4) only B. It allows a user to run several programs at the same time.
C. It must be an off-line system.
6. In a school, a computer teacher stores educational TV D. It requires a user’s immediate response.
programmes in a server. Students can choose any of the
programmes to watch on the computers in a multimedia 12. ‘A data processing method whose input and output are
learning centre. interleaved, like a conversation, allows the user’s input to
depend on earlier output from the same run.’
Which of the following best describes the above?
Which of the following best describes this data
2002-CE-COMP STUD 2-2 (C Version)
processing method? affect the number of lines in a document?
13. For a Sports Day, a file is used to store information about 18. Which of the following files can be attached to electronic
participating students and the events. Which of the mail?
following CANNOT be used as the key field?
(1) graphics files
A. Hong Kong Identity Card Number (2) audio files
B. student registration number (3) video files
C. class together with class number A. (1) and (2) only
D. student name together with event B. (1) and (3) only
C. (2) and (3) only
14. Consider the following worksheet in a spreadsheet D. (1), (2) and (3)
package:
19. Which of the following can be used in data
A B communication?
1 Amount 10000
2 Interest Rate 3% (1) twisted-pair wires
3 (2) optical fibres
4 Year Interest (3) microwaves
5 1 300 A. (1) and (2) only
6 2 600 B. (1) and (3) only
Cell B6 stores the product of B1, B2 and A6. If the C. (2) and (3) only
formula stored in cell B6 is produced by copying the D. (1), (2) and (3)
formula stored in cell B5, what should be the formula in
cell B5? 20. Which of the following software is commonly used to
retrieve information on the Internet?
(A $ sign before any column letters or row numbers
represents absolute addressing. Without the $ sign, A. a browser
B. a word processing package
relative addressing is used.)
C. a spreadsheet package
B1*B2*A$5 D. a graphics package
A.
B. B$1*B$2*A5
$B1*$B2*A5 21. Mary has produced the following picture using a graphics
C.
B1*B2*$A5 package.
D.
int main()
{
int x, y, z;
x = abs(-10.5);
y = 11 % 4;
z = x / 6 * y;
printf("%d\n", z);
}
A. -2
B. 1
C. 2
D. 3
int main()
{
int N, X;
FILE* infile;
A. 7
B. 8
C. 9
D. 17
int main()
{
char st1[80], st2[80], st3[80];
int i;
strcpy(st1, "PQRST");
strcpy(st2, "123");
strcpy(st3, st1);
strcat(st3, st2);
strncpy(st1, st3 + strlen(st1) - 1, strlen(st2));
st1[strlen(st2)] = '\0';
printf("%s\n", st1);
}
A. ST123
B. RST12
C. T12
D. 123
int main()
{
int sum, k, m;
sum = 0;
for ( k = 4; k >= 1; k-- )
for ( m = 1; m <= 5 - k; m++ )
sum = sum + 1;
printf("%d\n", sum);
}
A. 5
B. 10
C. 15
D. 20
int main()
{
int x, y, z;
x = 1;
y = 2;
z = 3;
if ( x >= y || y <= z )
{
x = y + z;
y = x + y;
}
else
{
x = y - z;
y = x - y;
}
printf("%d%4d\n", x, y);
}
A. 1 2
B. 5 7
C. -1 -3
D. 5 3
int main()
{
int i, j, target;
int N[10];
N[0] = 1;
for ( i = 1; i < 10; i++ )
N[i] = N[i - 1] + 5;
j = -1;
target = 20;
do
j++;
while ( !(target <= N[j]) );
printf("%d\n", j);
}
A. 3
B. 4
C. 5
D. 6
int main()
{
int col, row;
int x[4][5];
A. 1 2 3 4
B. 2 4 6 8
C. 3 6 9 12
D. 1 4 9 16
void S(int p)
{
p = 1;
printf("%d", p);
}
int main()
{
int i;
i = 2;
printf("%d", i);
S(i);
printf("%d\n", i);
}
A. 211
B. 212
C. 221
D. 222
int main()
{
int x, y;
x = 2;
y = 5;
if ( x < 1 )
if ( y > 4 )
x = x - y;
else
x = x - 3;
else
if ( y > 4 )
x = x * 4;
else
x = x + 2;
printf("%d\n", x);
}
A. -3
B. 2
C. 8
D. 4
int main()
{
int x, y;
int flag;
x = 7;
y = 1;
flag = true;
while ( x > 0 && flag )
{
x = x - 2;
y = y + 1;
flag = x > y;
}
printf("%2d%2d\n", x, y);
}
A. 3 3
B. 1 4
C. 0 5
D. -1 5
#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
Note: Figures in brackets indicate the percentage of candidates choosing the correct answers.