Sei sulla pagina 1di 11

F0038

General Directions:
Read and understand each statement carefully.
Write your answers on your test booklet.
Avoid unnecessary erasures.
Use black or blue pen only.

MULTIPLE CHOICE (60 x 1)


Choose the letter of the correct answer.
1) It is a step-by-step problem solving procedures in a finite number of steps.
a) Algorithm b) Flowchart c) Pseudocode d) Chart
2) It is the study of algorithm and is more than a branch of Science.
a) Algorithmic b) Scripting c) Charting d) Coding
3) It is a diagrammic representation that illustrates the sequence of operations to be performed for the solution of a
problem.
a) Map b) Graph c) Flowchart d) Chart
4) It consists of short English phrases used to explain specific tasks within a program's algorithm.
a) Algorithm b) Flowchart c) Pseudocode d) Chart
5) It refers to algorithms where instructions are executed one after another, one operation at a time.
a) Parallel Algorithm c) Chain Algorithm
b) Sequential Algorithm d) Nested Algorithm
6) It refers to algorithms where all instructions are executed concurrently.
a) Parallel Algorithm c) Chain Algorithm
b) Sequential Algorithm d) Nested Algorithm
7) It is a general approach to solving problems algorithmically that is applicable to a variety of problems from different
areas of computing.
a) Algorithm Design Technique c) Algorithm System Technique
b) Data Process Technique d) Problem Analysis Technique
8) A type of problem that asks to rearrange items of a given list in ascending order.
a) String Processing c) Searching
b) Sorting d) Mapping
9) A type of problem that deals with finding a given value called the key in a given list or set.
a) String Processing c) Searching
b) Sorting d) Mapping
10) A type of problem that deals with non-numerical values, used for manipulating text strings.
a) String Processing c) Searching
b) Sorting d) Mapping
11) A type of problem that deals with objects and their connections like determining whether all of the locations are
connected or finding the shortest path to a location.
a) Geometric b) Map c) Numerical d) Graph
12) A type of problem that deals with points, lines and polygons.
a) Geometric b) Map c) Numerical d) Graph

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 1 of 11
F0038

13) A type of problem that involves mathematical objects of continuous nature such as solving equations.
a) Geometric b) Map c) Numerical d) Graph
14) It is a way of organizing the data considering not only the items stored but also their relationship from each other.
a) Database System c) Array list
b) Data Structure d) File System
15) This type of data is considered as a single, non-decomposable entity such as int, floating points and char.
a) Atomic data c) Compiled data
b) Composite data d) Storage data
16) This type of data can be broken out into subfields b) Composite data
that have meaning.
c) Compiled data
a) Atomic data
d) Storage data
17) It refers to a set of data and the operations that can be performed on the data.
a) Data Structure b) Data Type c) Array list d) Linked list
18) It refers to a set of rules that holds data together.
a) Policy b) Structure c) Procedure d) Steps
19) It is a data structure that is represented by a list of element that has a unique successor.
a) Linear Data Structure c) Sequential Structure
b) Linked Data Structure d) Parallel Structure
20) A data structure that contains a fixed number of components with the same data type.
a) Array b) Node c) Database d) List
21) An ordered collection of data in which each element contains the location of the next element.
a) Array b) Linked List c) Data d) Queue
22) It refers to the element in the linked list.
a) Data b) Node c) Pointer d) Connector
23) It is the part of the node that holds useful information and data to be processed.
a) Data b) Node c) Pointer d) Connector
24) It is the part of the node that is used to chain the data to be processed and contains a link that identifies the next
element in the list.
a) Data b) Node c) Pointer d) Connector
25) A linked list where each node, except the last node , contains a single pointer to the next element.
a) Stack c) Singly Linked List
b) Queue d) Doubly Linked List
26) A linked list where each node, except for the first and last, contains pointer to both its successor and its
predecessor.
a) Stack c) Singly Linked List
b) Queue d) Doubly Linked List
27) A linear list in which all addition and deletion are restricted to one end and uses the LIFO algorithm.
a) Stack c) Singly Linked List
b) Queue d) Doubly Linked List

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 2 of 11
F0038

28) A data structure in which data can be inserted at one end, called the rear, and deleted from the other end called
the front.
a) Stack c) Singly Linked List
b) Queue d) Doubly Linked List
29) A queue operation that inserts an element at the rear of the queue.
a) Insert b) Update c) Enqueue d) Deque
30) A queue operation that deletes an element at the front of the queue.
a) Delete b) Remove c) Enqueue d) Deque
31) A data structure which consist of collection of nodes or vertices and line segments.
a) Graph data structure c) Map data structure
b) Chart data structure d) Demographic data structure
32) A graph in which each arc identifies a direction to its successor.
a) Directed b) Undirected c) Path d) Cycle
33) A graph that uses no arrow head in any of its lines where the flow between two vertices can go in either direction.
a) Directed b) Undirected c) Path d) Cycle
34) A sequence of vertices in which each variety is adjacent to the next one which are both directed and undirected.
a) Directed b) Undirected c) Path d) Cycle
35) A sequence of vertices in which each variety is adjacent to the next vertex but should start and end with the same
vertex.
a) Directed b) Undirected c) Path d) Cycle
36) A data structure that consist of a finite set of elements called nodes and a finite set of directed lines called
branches.
a) Queue b) Linked List c) Tree d) Stack
37) It is the number of branches in a tree data structure that is associated with a node.
a) Indegree b) Degree c) Root d) Outdegree
38) It is the branch in a tree data structure which is directed towards the node.
a) Indegree b) Degree c) Root d) Outdegree
39) It is the branch in a tree data structure, directed away from the node.
a) Indegree b) Degree c) Root d) Outdegree
40) It is the first node of the tree provided that the tree is not empty.
a) Indegree b) Degree c) Root d) Outdegree
41) It refers to any node in a tree data structure with an outdegree of zero.
a) Internal node b) Parent node c) Leaf d) Sibling
42) It is a node in a tree data structure which cannot be considered as root or a leaf because it is found at the middle
portion of a tree.
a) Internal node b) Parent node c) Leaf d) Sibling
43) It is the node in a tree data structure that has successor nodes.
a) Internal node b) Parent node c) Leaf d) Sibling
44) It is the node in a tree data structure that has predecessor.
a) Ancestor b) Descendant c) Sibling d) Child

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 3 of 11
F0038

45) It is the node in a tree data structure that has the same parent.
a) Ancestor b) Descendant c) Sibling d) Child
46) It is any node in the path from the root to the node.
a) Ancestor b) Descendant c) Sibling d) Child
47) It is any node in the path below the parent node.
a) Ancestor b) Descendant c) Sibling d) Child
48) It refers to the sequence of nodes in a tree data structure, where the node is adjacent to the next one.
a) Path b) Level c) Height d) Degree
49) It refers to the distance of the node from the root.
a) Path b) Level c) Height d) Degree
50) It refers to the level of the leaf in the longest path from the root plus 1.
a) Path b) Level c) Height d) Degree
51) It refers to any connected structure below the root.
a) Binary b) General c) Search d) Subtree
52) A tree where each node can have unlimited outdegree.
a) Heap b) Binary search c) Binary d) General
53) A tree in which no node can have more than two subtree.
a) Heap b) Binary search c) Binary d) General
54) A tree where values of the right nodes are always greater than or equal to its root's value and the left nodes are
always less than the value of the root node.
a) Heap b) Binary search c) Binary d) General
55) A nearly complete binary tree and the key value of each node greater than or equal to the value in each of its
descendents.
a) Heap b) Subtree c) Search d) General
56) It is used to investigate the algorithm's efficiency with respect to the two resources running time and memory
space.
a) Time efficiency c) Space efficiency
b) Analysis of Algorithm d) Order of Growth
57) It is the amount of memory required by an algorithm to run the application which is considered to analyze
algorithms.
a) Asymptotic Complexity c) Space efficiency
b) Time efficiency d) Order of Growth
58) It is measuring algorithm's running time or indicates how fast an algorithm is processed in the machine.
a) Asymptotic Complexity c) Space efficiency
b) Time efficiency d) Order of Growth
59) It refers to how time or space requirements grow as the problem size increases.
a) Asymptotic Complexity c) Space efficiency
b) Time efficiency d) Order of Growth
60) It is a way of expressing the main component of the cost of an algorithm, using idealized units of computational
work.
a) Asymptotic Complexity c) Space efficiency
b) Time efficiency d) Order of Growth
st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 4 of 11
F0038

MULTIPLE CHOICE (5 x 8)

Analyze the given programs and choose the letter of the correct answer.

1. Select the pseudocode that interprets the flowchart.

start
a. Begin
Enter rate and hours

Compute rate
Input hours
Display rate

End

b. Begin
Input rate Input hours

Input rate

Compute rate
Pay = hours * rate
Print rate

End
Print pay c. Begin
Input hours

Input rate
end
Pay = hours * rate

Print pay

End

d. Begin
Enter rate

Compute pay

Print pay

End

2.

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 5 of 11
F0038

2. Select the pseudocode that interprets the given flowchart:

Start

Sum=0

Product = 0

Read A, B

Print Sum,
Sum=A+B End
Product
Product= A*B

a. Begin
Sum =0 and product =0

Read A and B

Compute Sum

Compute Product

Print Sum and Product

End

b. Begin
Initialize Sum and Product into 0.

Read in the values of A and B.

Compute Sum by adding A and B, then compute Product by multiplying A and B.

Print the computer value of Sum and Product.

End

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 6 of 11
F0038

c. Begin
Initialize Sum =0 and product =0

Read A and B

Compute Sum and compute Product

Print Sum and Product

End

d. Begin
Enter sum=0

Enter product =0

Enter A and B

Read A and B

Compute sum and product

Print result

End

3. Select the pseudocode that interprets the given flowchart:

Start

Input A,B

Print A
A>B
Higher

Print B
End
Higher

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 7 of 11
F0038

a. Begin
Read in the values of A and B.

Test if A is greater than B.

If A is greater than B, A is higher. However, if A is less than B, B is higher.

Print the number and the remark Higher.

End

b. Begin
Enter values of A and B

Read values of A and B

Compare A and B

If A is greater than B, A is higher. Print the value of A and remark Higher.

End

c. Begin
Read in the values of A and B.

Test which is higher A or B.

Print the higher number and the remark Higher.

End

d. Begin
Initialize A and B to 0

Input A and B

Read A and B

Compare A and B

Print the letter

End

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 8 of 11
F0038

4. Select the correct pseudocode that interprets the given flowchart.

Start

Name=

Remarks=

Read Name,

Grade

Grade
Remarks=Passed
>= 60

Remarks=Passed
Print Name, End

Grade, Remarks

a. Begin
Initialize name and remarks into blanks.

Read in values for Grade and Name.

Test if Grade is greater than or equal to 60.

If Grade is greater than or equal to 60, remark is Passed.

However, if Grade is below 60, remark is Failed.

Print the name, grade, remarks.

End

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 9 of 11
F0038

b. Begin
Set the name and remarks to blank.

Compare Grade if greater than or equal to 60.

If the result is True/Yes, remark is Passed.

If the result is False/No, remark is Failed.

Print the name and grade.

End

c. Begin
Name = and remarks=

Read values of name and remark.

Compare Grade if greater than or equal to 60.

If the Grade is greater than or equal to 60, remark is Passed.

Otherwise remark is Failed.

Print the name, grade and remark.

End

d. Begin
Initialize name and remarks

Enter values for name and remarks

Read values and remarks

Read Grade

Test Grade

Print Grade and Remarks

End
Start
5. Select the correct pseudocode that
interprets the given flowchart.
C=1

C<10 End

C= C + 1

Print C

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 10 of 11
F0038

a. Begin
C= 1

If C is less than 10.

Print the value of C.

Add 1 to C.

If C is equal to 10.

Print the value of C and then stop.

End.

b. Begin
Initialize the value of C to 1.

Test if C is less than 10.

If C is less than 10, add 1 to the value of C, print the value

then go back to the previous step.

However, if C is greater than 10, stop processing.

End

c. Begin
Set the value of C to 1.

Compare value of C if less than 10.

If the result is yes, print C then go back to previous step.

If the result is no, stop.

End

d. Begin
Input the value of C

Test C

If True, print C

Else stop

End

st
1 Semester, AY 2013 2014 *Property of STI
Prelim Examination Page 11 of 11

Potrebbero piacerti anche