Prévia do material em texto
D. None of the above
33. What is the postfix form of the following prefix expression -A/B*C$DE
A. ABCDE$*/-
B. A-BCDE$*/-
C. ABC$ED*/-
D. A-BCDE$*/
34. The minimum number of multiplications and additions required to evaluate the
polynomial
P = 4x^3+3x^2-15x+45 is
A. 6&3
B. 4&2
C. 3&3
D. 8&3
35. The data structure required to evaluate a postfix expression is
A. queue
B. stack
C. array
D. linked-list
36. 6. The data structure required to check whether an expression contains balanced
parenthesis is
A. Stack
B. Queue
C. Tree
D. Array
37. The process of accessing data stored in a serial access memory is similar to manipulating
data on a
A. heap
B. queue
C. stack
D. binary tree
38. The postfix form of the expression is (A+B) * (C*D-E)*F/G is
A. AB+CD*E-FG/**
B. AB+CD*E-*F*G/
C. AB+CD*E-F**G/
D. AB+CDE*-*F*G/
39. The pre-order and post order traversal of a Binary Tree generates the same output. The
tree can have maximum
A. Three nodes
B. Two nodes
C. One node
D. Any number of nodes
40. What data structure would you mostly likely see in a nonrecursive implementation of a
recursive algorithm?
A. Stack
B. Linked list
C. Queue
D. Trees
41. Which of the following algorithmic paradigm is used in the merge sort?
A. Dynamic Programming
B. BackTracking
C. Greedy method
D. Divide and Conquer
42. What is the worst case performance of Selection sort algorithm?
A. O(log n)
B. O(n* n)
C. O(n)
D. O(n log n)
43. Let P be a quick sort program to sort numbers in ascending order using the first element
as the pivot. Let t1 and t2 be the number of comparisons made by P for the input [1 2 3 4
5] and [4 1 5 3 2] respectively. Which one of the following holds?
A. t1 = 5
B. t1 t2
D. t1 = t2
44. Consider the C function given below. Assume the array listA contains (n>0) elements,
sorted in ascending order.
int Process array (int * list A, int x, int n){
int i, j, k;
i =0;j=n-1;
do {
k = (i+j)/2;
if (xComposite Key d). Sort key
32. A two dimensional table of data is called a:
a). Group b). Set c). Declaration d). Relation
33. A relation is also known as:
a). Table b). Tuple c). Relationship d). Attribute
34. A row of a relation is called a (n)
a). Attribute b). Entity c). tuple d). Field
35. A key is:
a). A field that identifies only one record b). The most important field in a record
c). The first field of table d). None
36. Which of the following describes the primary key?
a). It must be unique b). It helps in indexing of a large database
c). It makes sorting quicker d). All of the above
37. How many primary keys can a table have?
a). One b). At least one, but not more than two
c). Between 1 and 5 d). No limit
38. Which field listed below is the most appropriate primary key?
a). A person’s name b). A person’s street address
c). A person’s birth date d). A person’s social security number
39. An attribute in a relation of a database that serves as the primary key of another relation in the
same database is called a:
a). Global key b). Line key c). Foreign key d). None
40. A primary key that consists of more than one attributes is called a:
a). Foreign key b). Composite key c). Multi-valued key d). Global key