2004 Ce Cs Paper Ii C Version

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 2004 Ce Cs Paper Ii C Version as PDF for free.

More details

  • Words: 3,501
  • Pages: 15
2004-CE COMP STUD PAPER II HONG KONG EXAMINATION AND ASSESSMENT AUTHORITY HONG KONG CERTIFICATE OF EDUCATION EXAMINATION 2004

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.

2004-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 an example of an embedded system? A. B. C. D.

2.

Which of the following is the main purpose of using an expert system? A. B. C. D.

3.

the coaxial cable the optical fibre the telephone line the microwaves

Mr. Lee wants to discuss a project with his overseas business partners. Which of the following is most helpful for him to communicate with his partners? A. B. C. D.

6.

More paperwork is required in transactions. People are not required to wait in a queue to pay bills. People are not required to carry bulky coins. More computer professionals are required to maintain the system.

Peter finds that whenever it is raining or there is a storm, his Internet access at home becomes unstable. Which of the following communication media will cause this problem? A. B. C. D.

5.

to train a user to become an expert to decrease the workload of experts to replace experts to help make decisions

Which of the following statements about electronic fund transfer systems is not correct? A. B. C. D.

4.

a mobile phone a graphics tablet a dictionary in a compact disc with videos and sound recorded a desktop computer

video on demand a search engine teleconferencing file sharing

Which of the following is/are the advantage(s) of direct access over sequential access?

A. B. C. D.

(1) Data can be stored in magnetic disks. (2) A huge amount of backup can be created more efficiently. (3) Data can be searched faster. (1) only (3) only (1) and (2) only (2) and (3) only

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

7.

Peter creates a database file with a record. Its structure is shown below: File name Type Size (bytes) NAME character 5 AMOUNT integer 2 Then he amends the contents of the record as follows: NAME AMOUNT is amended to JACK 10000 What will be the change of the file size? A. B. C. D.

8.

an increase of 1 byte no change a decrease of 1 byte a decrease of 2 bytes

multi-user batch processing multitasking interactive processing

After changing an application in a computer system from batch processing to real-time processing, what will the effect be?

A. B. C. D. 10.

AMOUNT 80

A user uses a computer to edit a document file and download a file from the Internet at the same time. What is the operating mode of the computer? A. B. C. D.

9.

NAME JACKY

(1) The response time of the application will be faster (2) The computer system will have a higher cost (3) The application will be easier to use. (1) only (1) and (2) only (1) and (3) only (2) and (3) only

Amy types the following worksheet in a spreadsheet package: A B C D E 1 Item 1 Item 2 Item 3 Total amount 2 March 1,000 1,500 800 3 April 1,200 1,100 1,000 4 May 1,300 1,200 750 5 She wants to find the total amount of items 1, 2 and 3 in each month. She types a formula in cell E2 and then copies it into cells E3 and E4. Which of the following formulae does she type? A. B. C. D.

=SUM(B$2+C$2+D$2) =SUM($B2:$B4) =SUM($B2:$D2) =SUM(B$2:D$2)

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

11.

Consider the following database file with two fields, CODE and ITEM, and five records. CODE ITEM A mouse 1 B keypad 2 CD printer 3 5 tablet 4 B scanner 5 CODE cannot be used as a key field because A. B. C. D.

12.

(1) They use different search engines. (2) They use different Internet service providers. (3) They search at different times. (4) They use different browsers. (1) and (2) only (1) and (3) only (2) and (3) only (2) and (4) only

Mr. Ng sends an email to Ms. Cheung. Later he receives a message from the system administrator saying that the mail server did not send out his email. Which of the following is/are the possible reason(s)?

A. B. C. D. 14.

CODE in the third record has two characters, which is not the same as others it is more than 1 byte wide the contents of CODE in the second and fifth records are the same the content of CODE in the fourth record is not alphabet

Peter and Mary use search engines to find the same information. They end up with different search results. Why?

A. B. C. D. 13.

.

(1) The attachment file is too large. (2) The email address is owned by someone else. (3) Only a blank character is entered in the email. (1) only (2) only (1) and (3) only (2) and (3) only

Three figures produced by a graphics package are given below:

If only these three figures are used, which of the following figures cannot be made without resizing the figures or inserting any new figures? A.

B.

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

C.

D.

15.

A company uses WAN instead of LAN to connect its computer because A. B. C. D.

16.

the data communication between the computers will be used frequently the data transfer rate needs to be higher than 6M bits per second the computers are located worldwide a supercomputer has been installed as a server in the main office

A company allows users to download its four software programs P, Q, R and S for free. Users are allowed to use P on a trial basis, Q with an expiring date, R with limited program functions and S with source code provided for modification. Which software program is not a shareware program? A. B. C. D.

17.

.

P Q R S

Peter finds that his computer is infected by a computer virus after doing the following actions. Which of the following actions are most likely to have caused this infection?

A. B. C. D. 18.

The main purpose of implementing a password system for logging onto computer systems is to protect the computers from . A. B. C. D.

19.

Frequently updating the anti-virus software in your personal computer Avoiding sending personal data without encryption Avoiding using your real name on the Internet under any circumstances Frequently changing the password of your personal email account

Which of the following is not a computer crime? A. B. C. D.

21.

Purchasing a legal software package and creating copies for friends to try Accessing a computer system without authorization but not viewing or deleting any files Distributing a large amount of different freeware to friends Converting a legal musical CD into musical files and sharing them on the web works closely with users to evaluate their requirements and to design new information systems for them.

A. B. C. D. 22.

system failure computer viruses anonymous emails unauthorized access

In order to protect personal data on the Internet, which of the following actions is most appropriate? A. B. C. D.

20.

(1) Accessing a file stored on a floppy disk given to him by his classmate (2) Downloading and installing a game from the Internet (3) Changing the wallpaper of the screen (4) Opening a text file attached to an email (1) and (2) only (2) and (3) only (3) and (4) only (1) and (4) only

A programmer A network administrator A computer technician A system analyst

Which of the following statements is correct? A. B. C. D.

The computational power of minicomputers is higher than that of microcomputers. Desktop computers are physically larger than minicomputers. Supercomputers are usually used in money transactions such as a point-of-sale system. Notebook computers weigh less than personal digital assistants (PDA).

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

23.

Which of the following are the major criteria to classify computers?

A. B. C. D. 24.

When the ROM is damaged, the computer A. B. C. D.

25.

printing documents copying files to a compact disc rewritable (CDRW). sorting records in a database surfing the Internet

Which of the following are the advantages of using a bar code reader over a keyboard to input data?

A. B. C. D. 27.

cannot boot up needs to have its battery replaced can still work if the hard disk is formatted can still work if the size of the RAM is enough

Which of the following benefits most from adding one or more CPUs in a personal computer? A. B. C. D.

26.

(1) physical size (2) processing speed (3) feasibility to be upgraded (4) size of RAM (1) and (2) only (1) and (3) only (2) and (4) only (3) and (4) only

(1) It is more accurate. (2) It is faster. (3) It has better security. (4) It has a lower hardware cost. (1) and (2) only (1) and (4) only (2) and (4) only (1), (2) and (3) only

In a university, there are many computer networks. Every workstation in each network has a unique 12-bit code as shown below:

The first 5 bits of the code are used ot identify the networks while the other 7 bits are used to identify the workstations. How many networks in the university and workstations in each network can the coding method represent? A. B. C. D. 28.

network 5 16 31 32

workstation 7 64 127 128

Suppose that n bits are used to represent integers by two’s complement method. If one additional bit (i.e. n+1 bits) is used, which of the following statements is correct? A. B. C. D.

The largest positive number is increased by 1. The largest positive number is doubled. The smallest negative number is decreased by 1. The smallest negative number is doubled.

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

29.

Which of the following errors may occur when floating-point representation is used to store numbers in a computer?

A. B. C. D. 30.

An operator inputs ‘5 KA 2’ instead of ‘NG KA YI’ in a name field. Which of the following methods can detect this error? A. B. C. D.

31.

(1) syntax errors (2) overflow errors (3) logical errors (4) truncation errors (1) and (2) only (1) and (3) only (2) and (4) only (3) and (4) only

Type check Presence check Length check Check sum

Generally, how many bytes are required to store the following 17 characters in plain text? 電腦科+資訊科技=電腦與資訊科技科 A. B. C. D.

32.

Which of the following statements about assemblers, compilers and interpreters is correct? A. B. C. D.

33.

Assemblers translate source programs into machine codes while the other two do not. Assemblers are used in old computer models while the other two are not. Interpreters translate each line of a source program into one machine code instruction. Compilers translate the whole program before program execution.

Under normal circumstances, when liquid crystal display (LCD) monitors are compared with cathode ray tube (CRT) monitors, which of the following statements are correct?

A. B. C. D. 34.

17 19 32 34

(1) LCD monitors are cheaper. (2) LCD monitors weigh less. (3) LCD monitors consume less electricity. (4) LCD monitors display more colours. (1) and (2) only (2) and (3) only (2) and (4) only (3) and (4) only

Which of the following registers mainly assist the computation of ALU?

A. B. C. D.

(1) the Status Register (2) the Accumulator (3) the Program Counter (1) and (2) only (2) and (3) only (1) and (3) only (1), (2) and (3)

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

35.

Which of the following is/are the reason(s) for creating different directories in a file system?

A. B. C. D. 36.

Referring to the Appendix (List of Commands in Mnemonics), which of the following will be the last register involved in the execution of the instruction ADD 1000 ? A. B. C. D.

37.

(1) a logical error (2) a syntax error (3) a run-time error (1) only (2) only (3) only (1) and (2) only

Which of the following is/are the reason(s) for using a graphical user interface in an operating system?

A. B. C. D. 39.

ACC MDR MAR IR

A programmer has written a program to computer and print a credit card monthly statement. The programmer finds that the total amount is not equal to the sum of all individual amounts on the statement. Which of the following errors has/have happened?

A. B. C. D. 38.

(1) To save hard disk storage space. (2) To help users to handle files. (3) To increase processing speed of the CPU. (1) only (2) only (3) only (1) and (3) only

(1) The system is user-friendly (2) It does not require users to memorize commands. (3) The system responds faster. (1) only (3) only (1) and (2) only (2) and (3) only

Mary develops a program and uploads its source code and object program onto her website. She expects that many people are able to modify the program for their own use. Which of the following types of programming languages and translators are the most suitable to develop this program? A. B. C. D.

a high level language and a compiler a high level language and an interpreter a low level language and an assembler a low level language and an interpreter

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

40.

Consider the following example of pseudocode: Do while not end of file Read a student record Calculate the total mark Print output result End do Which of the following statements about this pseudocode are correct?

A. B. C. D.

(1) The pseudocode is used to express an algorithm. (2) Each line is rewritten into one program statement. (3) The second, third and fourth lines are indented to improve the readability. (4) Pseudocode is a high level programming language and can be translated by a compiler or interpreter only. (1) and (2) only (1) and (3) only (3) and (4) only (2), (3) and (4) only

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

int main() { int a[5]; int x;

}

x = 1; a[0] = 4; do { a[x] = a[x - 1] + x; x = x + 1; } while ( x < 5 ); printf("%d\n", a[4]);

A. B. C. D. 42.

10 14 18 19

int main() { int a, b;

}

a = 18 % 4; b = 200 / 6; printf("%d", a + b / 5);

A. B. C. D.

7 8 10 17

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

43.

int main() { char x[80], s[80]; int i;

}

strcpy(x, "0"); for ( i = 1; i <= 20; i++ ) { sprintf(s, "%d", i); strcat(x, s); } printf("%d\n", strlen(x));

A. B. C. D. 44.

int main() { char s[80], t[80], tmp[80]; int n, k;

}

strcpy(s, "ABCDEFGHIJ"); strcpy(t, ""); n = strlen(s) / 2; for ( k = 0; k < n; k++ ) { strncpy(tmp, s + k, k + 1); tmp[k + 1] = '\0'; strcat(t, tmp); } printf("%s\n", t);

A. B. C. D. 45.

30 31 32 33

ABCDE ABCDEFGHIJ AABABCABCDABCDE ABCCDEDEFGEFGHI

void func(int x, int* y) { x = *y; *y = x; } int main() { int a, b; a = 5; b = 10; func(a, &b); printf("%d %d\n", a, b); } A. B. C. D.

5 5 5 10 10 5 10 10

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

46.

int main() { int x, y; for ( x = 1; x <= 7; x++ ) if ( (x % 3) == 0 ) for ( y = 1; y <= x; y++ ) printf("*"); else for ( y = 1; y <= x; y++ ) printf("+"); } A. B. C. D.

47.

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

}

z = 0; for ( x = 1; x for ( y = x; if ( x + y z++; printf("%d\n",

A. B. C. D. 48.

***+++***+++***+++*** +++***+++***+++***+++ ***+++*********++++++******* +++***+++++++++******+++++++

<= 10; x++ ) y >= 0; y-- ) == 4 ) z);

2 3 4 5

int main() { int x, y; x = 0; y = 0; while ( x <= 13 && !(y == 16) ) { y = x + y; x += 2; } printf("%d\n", y); } A. B. C. D.

0 30 42 56

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

49.

int main() { FILE* infile; char ch; int N;

}

infile = fopen("einstein.txt", "r"); N = 0; while ( !feof(infile) ) { fscanf(infile, "%c", &ch); if ( (int) ch >= 65 && (int) ch <= 90 ) N++; } printf("%d\n", N); fclose(infile);

The content of the file ‘einstein.txt’ is shown below: Before God we are all equally wise – and equally foolish. - Albert Einstein <eof> <eof> represents the end-of-file character. A. B. C. D. 50.

0 1 2 4

(Not available in C version)

2004-CE-COMP STUD 2-12 (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

2004-CE-COMP STUD 2-13 (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

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

Question No.

Key

Question No.

Key

1. 2. 3. 4. 5.

A (38) D (62) A (82) D (63) C (71)

26. 27. 28. 29. 30.

A (61) D (54) D (37) C (72) A (81)

6. 7. 8. 9. 10.

B (54) B (56) C (81) B (74) C (68)

31. 32. 33. 34. 35.

C (58) D (56) B (50) A (51) B (84)

11. 12. 13. 14. 15.

C (83) B (71) A (61) C (79) C (69)

36. 37. 38. 39. 40.

A (64) A (39) C (71) A (52) B (27)

16. 17. 18. 19. 20.

D (53) A (64) D (92) B (54) C (75)

41. 42. 43. 44. 45.

B (71) B (71) C (52) D (60) B (46)

21. 22. 23. 24. 25.

D (56) A (63) A (43) A (59) C (63)

46. 47. 48. 49. 50.

D (71) B (58) C (54) D (51) B (45)

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

2004-CE-COMP STUD 2-15 (C Version)

Related Documents