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. B. C. D.
2.
Which of the following can be found in a washing machine?
A. B. C. D. 3.
optical fiber microwave coaxial cable twisted pairs
Which of the following statements describes an advantage of having variable-length records in a data file? A. B. C. D.
5.
(1) embedded system (2) computer-assisted instruction (3) artificial intelligence (2) only (1) and (2) only (1) and (3) only (1), (2) and (3)
Which of the following media can be used in wireless communication? A. B. C. D.
4.
Robots can replace all the employees. Robots can work in a dangerous environment. Robots can follow the manufacturing procedures accurately. Robots can work 24 hours per day and 7 days per week.
It is easy to sort the records. It is easy to estimate the storage size of the data file. Less storage space is needed. It is easy to locate a record.
X is a data communication network connecting computers and peripherals within a building , while communication network covering a relatively large geographical area. What are X and Y? A. B. C. D.
6.
Y WAN Internet LAN LAN
Which of the following fields in a student report system cannot be validated by range check? A. B. C. D.
7.
X LAN WAN Internet WAN
age student name conduct grade examination score
Which of the following is not an example of an interactive system? A. B. C. D.
locating places on a campus map buying cinema tickets marking multiple-choice systems booking library resources
2003-CE-COMP STUD 2-2 (C Version)
Y
is a data
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. B. C. D.
9.
real time processing multi-user and batch processing multi-user and real time processing interactive processing
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. B. C. D.
10.
Which of the following drawing tool functions can be used to modify Diagram A to Diagram B?
A. B. C. D. 11.
spreadsheet package word processing package database management system graphics package
Enter an electronic mail address of the receiver Save the mail Attach a file to the mail Scan the mail for viruses
With a graphical user interface, which of the following can be represented by an icon?
A. B. C. D. 14.
Diagram B
Which of the following actions must be done before sending an electronic mail? A. B. C. D.
13.
Diagram A rotate flip vertical cut flip horizontal
Which of the following software packages is the best option for maintaining the inventory of a department store? A. B. C. D.
12.
60 66 89 98
(1) a program file (2) a spreadsheet file (3) a video file (1) only (2) and (3) only (1) and (3) only (1), (2) and (3)
Peter uses three functions of a word processing package to edit the document below.
2003-CE-COMP STUD 2-3 (C Version)
Sports I love playing volleyball, basketball and soccer very much!
Sports I love playing volleyball, basketball and
soccer very much! Original document Document after editing Which of the following functions is not used by Peter? A. B. C. D. 15.
In a database file, data may be lost if A. B. C. D.
16.
electronic mail teleconferencing fax video on demand
A computer virus is a A. B. C. D.
19.
(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. (1) and (3) only (1) and (2) only (2) and (3) only (1), (2) and (3)
Which of the following electronic communication cannot transfer audio messages? A. B. C. D.
18.
the field type of a field is changed from integer to character an extra field is inserted a field name is shortened the field width of a field is reduced
Which of the following are the correct ways to search for information by using search engines?
A. B. C. D. 17.
line spacing font type justification underline
file.
text database graphic program
When you buy a common application software, it basically implies
A. B. C. D.
(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 (1) only (2) only (3) only (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?
A. B. C. D. 21.
Which of the following factors is most closely related to the processing speed of a computer? A. B. C. D.
22.
13 14 15 16
Mr. Wong wants to make a full backup of a file server daily. Which of the following storage media should he use? A. B. C. D.
25.
modem floppy disk drive scanner driver printer
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. B. C. D.
24.
the number of peripheral devices connected to the CPU the physical size of the CPU the number of registers in the CPU the number of instructions the CPU can execute per second
Which of the following is not hardware? A. B. C. D.
23.
(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. (1) only (2) only (1) and (3) only (2) and (3) only
floppy disk compact disc recordable (CDR) hard copy magnetic tape
Which of the following statements about compact disc rewritable (CDRW) is/are correct?
A. B. C. D.
(1) Users cannot update the contents. (2) It is a volatile memory. (3) It can store a large number of graphic files. (2) only (3) only (1) and (2) only (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?
A. B. C. D. 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. B. C. D.
28.
current instruction next instruction address of the current instruction address of the next instruction
(1) Pascal (2) Assembly language (3) COBOL (4) Machine language (1) and (2) only (1) and (3) only (2) and (4) only (3) and (4) only
Which of the following is not an advantage of using modular approach in writing programs? A. B. C. D.
32.
.
Which of the following are high level programming languages?
A. B. C. D. 31.
(1) Fetch an instruction from main memory. (2) Execute the instruction. (3) PC is automatically increased by 1. (4) Decode the instruction. (1) (4) (3) (2) (4) (3) (1) (2) (1) (3) (4) (2) (1) (3) (2) (2)
The Instruction Register (IR) holds the A. B. C. D.
30.
400 + 112 -400 + 112 400 – 112 -400 – 112
Which of the following is the sequence of actions taking place when an instruction is executed by a CPU?
A. B. C. D. 29.
(1) optical character reader (2) optical mark reader (3) bar code reader (1) only (2) only (3) only (1) and (2) only
Program logic is simpler. Program design is clearer. Program maintenance is easier. Program execution is faster.
Which of the following tasks is not usually performed by a point-of-sale terminal?
2003-CE-COMP STUD 2-6 (C Version)
A. B. C. D. 33.
Floating-point representation is usually used instead of fixed-point representation in the representation of numerical data in computers because of . A. B. C. D.
34.
wider range of numbers represented no overflow errors no truncation errors no sign bits
Which of the following registers are closely related to the main memory?
A. B. C. D. 35.
cash payment display of product information bill printing record of customers’ complaints
(1) IR (2) MAR (3) ACC (4) MDR (1) and (3) only (2) and (4) only (1), (2) and (3) only (2), (3) and (4) only
The diagram below shows the relationship between end users and a computer. end users X Y Z Which should be X, Y and Z? A. B. C. D.
36.
Z hardware operating system application software operating system
(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. (2) and (3) only (1) and (2) only (1) and (3) only (1), (2) and (3)
Which of the following is not an operating system? A. B. C. D.
38.
Y operating system hardware hardware application software
Which of the following can control the access of files?
A. B. C. D. 37.
X application software application software operating system operating system
UNIX LINUX JAVA DOS
During compilation, Programming Language A will be compiled into Programming Language B. Programming Language A
2003-CE-COMP STUD 2-7 (C Version)
compilation
Programming Language B
Which of the following are the reasons for using programming language A instead of programming language B in writing programs?
A. B. C. D. 39.
Which of the following statements about pseudocode is/are correct?
A. B. C. D. 40.
(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. (1) and (3) only (1) and (4) only (2) and (4) only (3) and (4) only
(1) CPU can understand pseudocode directly. (2) Pseudocode can be rewritten into program instruction. (3) Pseudocode has no particular syntax rules. (2) only (2) and (3) only (1) and (2) only (1) and (3) only
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. B. C. D.
The teacher types the marks twice to check if there is any difference or not. The teacher types the marks once and another teacher repeats the task to check if there is any difference or not. The teacher types the marks once and checks the printout against the marks displayed on the screen. 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. B. C. D.
2 4 6 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. B. C. D.
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. B. C. D. 44.
10 14 30 55
7 9 14 32
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. B. C. D.
N M L 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. B. C. D.
46.
3 4 5 6
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. B. C. D.
47.
71245 71275 7945 712712
int main() { char s[] = "abcdefgh"; char s2[9]; strncpy(s2, s + strlen(s) - 6, 3); s2[3] = '\0'; printf("%s\n", s2); } A. B. C. D.
abc cde abcde 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. B. C. D. 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. B. C. D. 50.
011 101 110 001
347 374 447 473
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. B. C. D.
10 11 12 21
2003-CE-COMP STUD 2-11 (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
2003-CE-COMP STUD 2-12 (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
2003-CE-COMP STUD 2-13 (C Version)
Question No.
Key
Question No.
Key
1. 2. 3. 4. 5.
A (85) * B (87) C (51) A (72)
26. 27. 28. 29. 30.
A (54) A (51) C (56) A (47) B (80)
6. 7. 8. 9. 10.
B (80) C (64) B (87) D (68) A (62)
31. 32. 33. 34. 35.
D (54) D (82) A (65) B (51) A (47)
11. 12. 13. 14. 15.
C (80) A (96) D (63) C (76) D (45)
36. 37. 38. 39. 40.
B (60) C (67) C (61) B (37) C (72)
16. 17. 18. 19. 20.
D (55) C (88) D (91) A (95) A (69)
41. 42. 43. 44. 45.
C (74) C (79) D (80) A (75) C (53)
21. 22. 23. 24. 25.
D (82) C (79) D (64) D (41) B (61)
46. 47. 48. 49. 50.
B (36) B (73) C (61) D (87) A (73)
Note: Figures in brackets indicate the percentage of candidates choosing the correct answers.
2003-CE-COMP STUD 2-14 (C Version)