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. 1.
Which of the following statements does NOT comply with the Personal Data (Privacy) Ordiance? A.
Personal information cannot be changed without authorization. Personal information is kept up-to-date. Personal information is not disclosed to unauthorized parties. Personal information is kept longer than necessary. Personal information is used for a specified purpose.
B. C. D. E. 2.
6.
Selling “Freeware” downloaded from the Internet Download “Freeware” from the Internet Using a computer in a public library to log onto the Internet Making a fund transfer through the Internet Backup up data files downloaded from the Internet
B. C. D. E.
7.
C
T
U
X
B
Front
Rear
8.
Which of the following diagrams shows the queue after the deletion of two items and the insertion of three items P, Q and F?
4.
A.
C
T
U
P
Q
B.
U
X
B
P
Q
C.
U
X
B
P
Q
F
D.
C
T
U
X
B
P
E.
P
Q
F
U
X
B
F
Given three two’s complement 8-bit integers X, Y and Z such that Z = X + Y, where Y is the one’s complement of X. What is the value of Z in decimal? A. B. C. D. E.
5.
Q
-127 -1 0 255 127
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)
9.
(1) Computer Aided Design (2) Computer Animation (3) Computer Assisted Learning (1) only (2) only (1) and (2) only (2) and (3) only (1), (2) and (3) only
Which of the following mode of processing systems can respond quickly to some external events? A. B. C. D. E.
F
(1) Spreadsheet (2) Word processing (3) Graphics (4) Database (4) only (1) and (4) only (2) and (3) only (2) and (4) only (1), (2) and (4) only
Which of the following area(s) is/are (an) application(s) of computer graphics?
A. B. C. D. E.
The following diagram shows a queue containing five items:
1110 1010 1010 1010 0101 0101 1101 0101 1010 1011
Which of the following software can be used to create a data file for mail-merging?
A. B. C. D. E.
Which of the following is considered a computer crime? A.
3.
A. B. C. D. E.
Time sharing Batch Real time Multitasking Interactive
Records in a random file are stored… A. B. C. D. E.
in a location assigned by an addressing algorithm. in a location assigned by a random number generator. in any empty location. in the order of input. in the order of the key.
10.
(1) Random Access Memory (2) Hard Disk (3) Magnetic Tape Drive Arrange these in term of access speed, from the slowest to the fastest
Which of the following networks is a star network? A.
B.
C.
A. B. C. D. E.
D. 16.
Which of the following data transmission media is NOT subject to electrical interference? A. B. C. D. E.
12.
Twisted pair wire Coaxial cable Optical fiber Radio None of the above
Instruction(s) MOV 150, A
The function(s) of the Control Unit is/are (1) (2)
A. B. C. D. E. 13.
Status register Instruction register Program counter Accumulator RAM
Which of the following peripherals are output devices?
A. B. C. D. E. 15.
MOV
A, &150
MOV
&150, &130
A. 150 160 B. 150 160 C. 170 160 D. 150 160 E. 170 160 (This item was deleted.) 17.
(1) Plotter (2) CD-ROM Drive (3) Scanner (4) Hard Disk Drive (1) and (2) only (2) and (4) only (1) and (3) only (1) and (4) only (3) and (4) only
Below are 3 storage media:
2000-CE-COMP STUD 1A-3 (C Version)
Meaning Copy the value of 150 into the accumulator. Copy the content of the accumulator into memory location 150. Copy the contents of the memory location 150 into the memory location 130. 170 0 0 150 150
Which of the following is/are true about a laser printer?
Which of the following is NOT a register inside the CPU? A. B. C. D. E.
14.
to interpret the instructions to direct all operations within the processor (3) to send and receive control signals from peripheral devices (2) only (3) only (1) and (2) only (2) and (3) only (1), (2) and (3)
The following shows part of the contents of the memory: Memory Location Memory Content 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. What will the value of at memory locations 130, 140, 150 respectively?
E.
11.
(3), (2), (1) (2), (1), (3) (1), (3), (2) (2), (3), (1) (1), (2), (3)
A. B. C. D. E.
(1) It outputs high-quality hard copy. (2) It is an impact printer. (3) It operates quietly. (1) only (2) only (1) and (3) only (2) and (3) only (1), (2) and (3)
(1)
18.
Which of the following will affect the output quality of a visual display unit?
A. B. C. D. E. 19.
People can work at home using a home computer connected to the computer in their office. Which of the following is false? A. B. C. D. E.
20.
User’s manual Operation guide Tutorial manual Program listing Trouble shooting manual
The following steps are supposed to sum the integers of 1 to 9 and store the result in Y.
A. B. C. D. E.
Variable X is not initialized. Variable Y is not initialized. There is an infinite loop. The value of X is not output. Step 3 and Step 4 are misplaced.
Which of the following is/are example(s) of the infringement of copyright?
2000-CE-COMP STUD 1A-4 (C Version)
Which of the following about a stack is/are true? (1) (2)
A. B. C. D. E. 25.
26.
0.11011 1010 0.11011 10-10 11011 1011 11011 10-11 1.1011 1001
Using 13-bit, 2’s complement representation, what is the result of –513 – 512? A. B. C. D. E.
27.
It is a first-in-first-out data structure. Two pointers are required for a stack operation. (3) It can be used to store returning addresses for procedure calls in a program (1) only (2) only (3) only (1) and (2) only (1) and (3) only
The decimal number 3.375 in binary normalized form is A. B. C. D. E.
electronic data processing manager system analyst systems engineer programmer computer operator
Step 1 assign 1 to X Step 2 if X > 9 then go to step 6 Step 3 assign the value of (Y + X) to Y Step 4 assign the value of (X + 1) to X Step 5 go to step 2 Step 6 output the value of Y Execution of the above steps cannot get the correct answer. Which of the followings is the possible reason for the error?
23.
24.
It provides a relax working atmosphere. There is better team spirit. There is possible family distraction. Less office space is needed. It allows flexible working hours.
In stages of computerization, the person mainly responsible for producing the system flowchart is the . A. B. C. D. E.
22.
A. B. C. D. E.
Which of the following is NOT normally sold as part of an office automation software package? A. B. C. D. E.
21.
(1) Number of colours (2) Resolution (3) Memory size (1) only (1) and (2) only (1) and (3) only (2) and (3) only (1), (2) and (3)
Peter downloaded a shareware from the Internet and continued to use it after the free trial period. (2) When Mary submitted her assignment to her teacher via the network, the teacher’s computer became infected. (3) Tom sold pirated software. (3) only (1) and (3) only (1) and (2) only (2) and (3) only (1), (2) and (3)
1000000000001 1101111111111 0111111111111 underflow occurs overflow occurs
Which of the following tasks can be performed by a database management system? (1)
A. B. C. D. E.
listing customers who used mobile phone for more than 100 minutes in last month (2) sorting students’ marks in descending order (3) producing invitation letters to customers (1) only (3) only (1) and (2) only (2) and (3) only (1), (2) and (3)
28.
A. B. C. D. E.
Which of the following tasks can be performed by a spreadsheet software? (1)
A. B. C. D. E. 29.
(1) It is easier to set up the system. (2) The hardware is cheaper. (3) The information is more up-to-date. (1) only (2) only (3) only (1) and (3) only (2) and (3) only
A. B. C. D. E.
withdrawing money from a bank account through an automatic teller machine (2) sending bank statements to customers (3) booking airline tickets (1) only (2) only (3) only (1) and (2) only (1) and (3) only
33.
34.
(2) (3)
An employee’s record can be located using a sequential search. An employee’s record can be located using a binary search. An employee’s record can be located directly.
2000-CE-COMP STUD 1A-5 (C Version)
(1) Ring (2) Bus (3) Star (1) only (1) and (2) only (1) and (3) only (2) and (3) only (1), (2) and (3)
Which of the following is/are the duties of a computer operator?
A. B. C. D. E. 35.
Name Class_no Class and Name Class and Class_no Class_no and Name
To avoid network failure caused by the malfunction of a node in a network, which of the following network topologies should be implemented?
A. B. C. D. E.
A company uses a sequential file to store the records of its employees. Which of the following statements is/are true? (1)
In a school, Name, Class, Class_no are three fields in a file used to store student names, classes and class numbers respectively. Which of the following can be used as the key field? A. B. C. D. E.
Which of the following tasks should be accomplished using an interactive system? (1)
31.
32.
Which of the following is/are the advantage(s) of real-time processing over batch processing?
A. B. C. D. E. 30.
seeing how different interest rates will affect the monthly repayment of mortgage loans (2) plotting charts of weekly temperatures (3) analyzing the test marks of students (1) only (3) only (1) and (2) only (2) and (3) only (1), (2) and (3)
(1) only (2) only (3) only (1) and (2) only (1) and (3) only
(1) mounting disks (2) backing up data (3) collecting and entering data (1) only (2) only (1) and (2) only (2) and (3) only (1), (2) and (3)
Which of the following techniques can be used during algorithm design? A. B. C. D. E.
decomposing the problem documenting the program defining the problem coding the program debugging the program
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. B. C. D. E.
37.
0 1 2 3 4
#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. B. C. D. E.
38.
00100 01010 01011 01101 01110
#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. B. C. D. E.
0 1 2 3 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. B. C. D. E. 40.
231 123 233 123 311 123 231 231 311 311
#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. B. C. D. E.
3 6 8 11 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. B. C. D. E. 42.
543 578 5432 5433 5788
#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. B. C. D. E.
8 11 14 74 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. B. C. D. E.
ZY ZYXV ZYXVR ZYXVRQ 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. B. C. D. E.
4 5 6 7 8
2000-CE-COMP STUD 1A-9 (C Version)
Direcitons:
A. B. C. D. E.
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 true true true false false
2nd statement true true false true false
the 2nd statement is a correct explanation of the 1st statement the 2nd statement is not a correct explanation of the 1st statement -
1st statement
2nd statement
46.
Multimedia files must be compressed before saving to the mass storage media.
Rewritable CD are suitable media for storing multimedia files.
47.
In a microcomputer, the number of bytes required to store a Chinese character is more than an English character.
Chinese character can be inputted by a combination of keys on a keyboard.
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 people to read.
A machine code program cannot include comment statements.
2000-CE-COMP STUD 1A-10 (C Version)
A Partial Character List for ASCII Character 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I
ASCII 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
Character J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c
ASCII 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
Character d e f g h I j k l m n o p q r s t u v w x y z { | }
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 (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 INP OUT STA LDA JMP JPN JPZ INC DEC ADD
Operand XXX XXX XXX XXX XXX XXX XXX 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
2000-CE-COMP STUD 1A-12 (C Version)
Question No.
Key
Question No.
Key
1. 2. 3. 4. 5.
D A C B E
26. 27. 28. 29. 30.
B E E C E
6. 7. 8. 9. 10.
E E C A C
31. 32. 33. 34. 35.
A D D C A
11. 12. 13. 14. 15.
C E E D A
36. 37. 38. 39. 40.
D B B C A
16. 17. 18. 19. 20.
deleted C E B D
41. 42. 43. 44. 45.
E C D D A
21. 22. 23. 24. 25.
B B B C A
46. 47. 48. 49. 50.
D B D C A
Note: Figures in brackets indicate the percentage of candidates choosing the correct answers.
2000-CE-COMP STUD 1A-13 (C Version)