Professional Documents
Culture Documents
FORM 2010158
Hou.fi mu do voted 1
the
att
man signature de
CARIBBEAN EXAMINATIONS COUNCIL
90 minutes
Each item in this test has four suggested answers lettered (A),(B),(C),(D). Read
each item you are about to answer and decide which choice is best.
0158
On your answer sheet, find the number which corresponds to your item and shade the
space having the same letter as the answer you have chosen. Look at the sample item
below.
Sample Item
How many selection lines does an 8x1 multiplexer have?
AFFIXSEAL HERE
Sample Answer
(A) (B) (C) (D)
12 3 8
The best answer to this item is "3", so answer space (C) has been shaded.
If you want to change your answer, be sure to erase it completely before you fill
in yournew choice.
When you are told to begin, turn the page and work as quickly and as carefully as you
can. If you cannot answeranitem, omititand go on to the next one. You can return later to the
item omitted. Your
score will be the total number of correct answers. You may
do any rough work in this booklet. Figures are not necessarily drawn to scale.
The useofnon-programmable calculators is allowed.
6.
What is the 4 bit one's complement representation of 6?
The decode part of the fetch-decode execute cycle in a computer involves
(A)
(A)
finding
(B)
(B)
0110 1010 1001 1011
finding the location of an instruction determining what the operation is
determining what the operands are extracting the data for the various
instruction fields
(D)
.
The decimal equivalent of the ASCII representation of 'A'is 65. What is the ASCII
decimal representation of‘J'?
7.
The second part of a floating-point representation of a number is called the
(D)
T
- 8.
Read Only Memory (ROM)
A computer designer wishes to store some instructions which need to be
quickly retrieved. Which of the following is the BEST location to place the
instructions?
V
II. III.
is volatile is programmable is mounted on the mother board holds
instructions for booting up a
computer
(A) (B) (C)
Hard drive Floppy disk Cache memory Random access memory
I and III only III and IV only I, II and IV only II, III and IV only
)
A user wishes to properly close all open files and log off her computer when
there is an electricity outage. What device does she need to handle this?
Which of the following statements about logic gates are FALSE?
LEWANDOW
(A)
Surge protector Voltage regulator PDA UPS
(C) (D)
I.
II.
5.
Which of the following devices represent components of a CPU?
m
III.
ANOT gate can have only one input
and only one output. A NOT gate can have one or more
inputs, but only one output. A NOR gate can have only one input
and only one output. A NOR gate can have one or more
inputs, but only one output.
.
ALU
II.
CU
III. IV.
Registers RAM
Nimi
(A)
I and III only I and IV only II and III only II and IV only
(C)
:
I and II only II and III only I, II and III only I, II, III, IV
(B)
-*
..
.
.
-3-
AI BI F
The CPU deals with each instruction in a cycle. The sequence of instructions
to carry out one machine instruction is called the instruction or machine cycle.
The first action is to fetch the instruction from memory and then the program
counter is updated (reset). The other three phases of the machine cycle in the
correct order are
...
...
..
.
1
1
.
1 Figure 2
... ..
Figure 1
...
.
(A)
.
10.
The truth table in Figure 2 above corresponds
.
to
.
(B)
..
14.
11.
The symbol that should replace the box in Figure 1 is
A list of computers is given below. List them in order from SMALLEST to
LARGEST.
DDDD
I. II. III. IV.
PDA Supercomputer Laptop Microcomputer
TILE
(A)
(D)
IV
----
12.
-
(A) (B)
4:
-4
Which of the following algorithms will find the sum of all the even
divisors of any positive integer n?
...ITULU
.
I. Retains data when its power supply
is switched off. II. An electronic pathway along which .. signals can be
sent from one part
of a computer to another. III. Used to hold the addresses of
instructions and data in memory, IV. The frequency with which a
processor executes instructions or data that is processed.
--..---...
NB: The mod operator finds the remainder when the first number is divided by
the
second.
Which of the following rows in the table shows the BEST match of EACH word
to the given statement.
-
--
-
--
-
II.
EPROM
-"
--
(D) |
III
I
,
TITE
III.
sum=0 i=n while i >0
sum = sum +i
i=i - 2 end while print sum
'
(C) (D)
'
-
'
'.
'
"
"
!!
T
*
-
'
r
'
--
.
-
.
---
.'
"
-
"
----
-
-
-
-
--
-
-
.-
.
--
.--.F
-C-VT NU
I
-
arr[j]=arr[j] +3
I. II.
Selection Sequence Iteration
19.
while ((c=getchar()) !=“0')
III.
(A)
Items 20-21 refer to the following algorithm.
I and II only I and III only II and III only I, II and III
(D)
binary (num)
IF (num <= 1) THEN
PRINT num
Which of the following statements is TRUE?
ELSE
binary (num/2) PRINT (num mod 2)
(A)
(B)
END IF
The value of X at the end of
Algorithm III is 2. The value of X at the end of Algorithm II is 77. The value of
X at the end of
Algorithm III is 77. The value of x at the end of
Algorithm Iis 501.
(C)
END
(D)
The mod operator finds the remainder when the first number is divided by the second,
20.
24
In this algorithm, calls are made to itself. This is an example of
If the algorithms were to be arranged such that the values of X are in ascending order
after completion, then the order of the algorithms will be
(A)
selection sequencing iteration recursion
(A)
(D)
I, II, III I, III, II III, I, II III, II, I
)
21.
If the algorithm was called with binary (3), the output would be
25.
Which of the following code segments will assign the discount price to a product for a given
product price?
I only I and II only I and III only II and III only
(1)
26.
Which of the following steps about program translation is TRUE?
LRT..
.
(A)
-
--
if(price>90)
(D)
I
27.
nteri-.
if (price>10)
price=price - (price * 0.05) else if ( price > 30)
. price=price - (price *0.10) else if (price > 60)
price = price - (price * 0.13) else
end if
.
end if end if
L
G
-
----
BEGIN
MAIN
do something (x,
y) IF y = TRUE
THEN do this (x) ELSE
do this (y)
END IF
print
(x)
END
MAIN
28
.
Which flowchart is a correct representation
of this algorithm?
(A)
(B)
Begin
Main
Begin
Main
do something
(x, y)
do something (x, y)
Do this (x)
Do that
(x)
(x =
True
Print
(x)
End Main
End
Main
Do this
(y)]
Do
this
(x)
Begin
Main
(D
)
Begin
Main do something (x, y)
Do this (w) Do that (2)
(Begin
Main do
something
(x, y)
Print
(x)]
y=Tru
e
Do this
(y)]
Do
this (x)
Print
(x)
End
Main
1-1
LL LUI
GO ON TO THE NEXT
PAGE
-8-
(A) (B)
BEGIN
x=2 y=6 WHILE Y>x
printy
yuy-2 ENDWHILE print y
object code source code assembly language machine language
Items 33 - 34 refer to the following code segment where % is the modulus operator.
END
29.
Which of the following represents the output of the algorithm?
I. II.
int num[5]={1,9,8,2,11}; intx=num [0]; intr; int sum=0;
III.
IV.
(A) (B)
6,4,2 6,4,4 6,4,2,0 6,4,2,2
V.
for (r=0;r<5;r++) {
,
30.
Which of the following represent(s) the properties of a well-designed algorithm?
VI. if (num [r] %2 = = 0) &&
(num[r]<x) VII. sum=sum+num [r]; VIII. X=num[r];
IX.)
1.
Clearly defined and unambiguous
steps. Finite number of steps. Gives a general solution to the
problem
II. HII.
33.
What is the value of the variable sum when the for loop terminates?
(A)
(B) (C)
>)
I only II only II and III only I, II and III
(A) (B) (C) (D)
0 8 10 14
weLL-LAW
34.
31.
In the programming language C, what data. type should be used to store a
currency value in a program?
Change the if condition in line VI to if (num [r] %2 == 1) && (num [r] >x). What
value will be stored in the variable sum?
(A)
(A)
Long Double : Integer Alphanumeric
GO ON TO THE NEXT PAGE
35.
-9 Which of the following allows already compiled modules to be combined with the
compiled program to generate an executable file?
Item 38 refers to a certain struct which is declared as follows:
struct Record {
int x; int y [5];
(A)
(B)
(C) (D)
Translator Linker Compiler Program
Two variables are then declared as follows:
(B)
(C)
request the programmer to input
statements provide the view a programmer has
of the program edit the program written by the
programmer change how a programmer sees a
program
Ly
|0
0
0
0
0
1
(D)
38.
Which of the following code segments will result in record2 being an identical copy of
record/?
37.
(A)
Which of the following criteria should be considered when choosing a suitable
programming language?
(B)
(C)
record2 = 0; record2 = recordl; record2.x = record1.x record2.y = record1.y int i;
I.
(D)
The nature of the application The availability of a suitable compiler/
interpreter The expertise of the programmers
III.
record2.[x] = 0; for(i=0; i<5;i++)
record2.[y][i] = 0;
(B)
I and II only I and II only II and III only I, II and III
39.
What is the correct order of the compilation process for the stages listed below?
)
I.
II.
Inter
Syntax analysis Intermediate code generation Semantic analysis Code optimization Lexical
analysis Code generation
IV.
V.
(A) (B)
)
I
I>IVII-III IV-VI
V -III-II-IV-VI V»I>IIIII-IV-VI V>IIIIII-IV-VI
GO ON TO THE NEXT PAGE
www
- 10 -
40.
43.
What is the value of x after the following CODE is executed?
A user wishes to declare a variable in C, which can store the square root of an
integer. Which of the following is the MOST appropriate declaration?
int x=2; int n=3; while (n>0){
x=x* 3; n=n - 1;
w wwwwwwwww
(A)
dan
double num; char num [10] char num; int num;
(C)
(D)
aw
Items 44 - 45 refer to the following scenario.
ලිසුමට
A text file, data.txt contains several lines of data. A certain program opens this file as
follows:
Which of the following is the BEST paradigm to use for calculating the total usage
time for all Internet accounts on a server?
FILE *fp= fopen("data.txt", "w");
44.
(A) (B)
Which of the following BEST describes one of the effects of the fopen statement
above?
(C)
Scripting Functional Procedural Object-oriented
(A)
What is one MAIN reason for the difference in the programming languages for small
mobile devices like mobile phones and desktop computers?
New data is stored at the end of the
file, after all the existing data. New data is stored at the beginning of the file,
before all the existing data. Existing data is completely erased and
the file will contain only new data. Existing data in the file is gradually
erased to make room for new data.
(A)
(B)
45.
Mobile devices are used more than
desktop computers. Mobile devices have better programs
than desktop computers.
· Mobile devices have less memory
and other resources than desktop computers. Mobile devices have a larger
screen
for playing games.
An integer variable, x, has a certain value. Which of the following statements can be
used to store the value of x in the file?
(C)
(D)
(A) (B) (C)
fp = fprintf ("%d", x); fprintf(fp,"%d", x); fprintf ("data.txt", "%d", x); fprintf("%d",
x);
02115010/CAPE 2010