1 |
Consider three decision problems P1,
P2 and P3. It is known that P1
is decidable and P2 is undecidable. Which one of
the following is TRUE? |
Options |
A) P3 is decidable if P1
is reducible to P3 |
B) P3 is undecidable if P3
is reducible to P2
|
C) P3 is undecidable if P2
is reducible to P3
|
D) P3 is decidable if P3
is reducible to P2s complement |
|
|
|
Correct Answer |
A |
|
2 |
Which one of the following are essential features of an
object-oriented
programming language?
(i) Abstraction and encapsulation
(ii) Strictly-typedness
(iii) Type-safe property coupled with sub-type rule
(iv) Polymorphism in the presence of inheritance
|
Options |
A) (i) and (ii) only |
B) (i) and (iv) only |
C) (i), (ii) and (iv) only |
D) (i), (iii) and (iv) only |
|
|
|
Correct Answer |
B |
|
3 |
Consider the following relation schema
pertaining to a students database:
Student (rollno, name, address)
Enroll (rollno, courseno, coursename)
where the primary keys are shown underlined. The number of
tuples in the Student and Enroll tables are 120 and 8
respectively. What are the maximum and minimum number of
tuples that can be present in (Student * Enroll), where
‘*’denotes natural join? |
Options |
A) 8, 8 |
B) 120, 8
|
C) 960, 8 |
D) 960, 120
|
|
|
|
Correct Answer |
C |
|
4 |
Assume
the following C variable declaration
int *A [10], B [10][10];
Of
the following expressions
I
A[2]
II
A [2] [3]
III
B
IV B[2][3]
which
will not give compile-time errors if used as left hand sides
of assignment statements in a C program ?
|
Options |
A) I, II, and IV only |
B) II, III, and IV only
|
C) II and IV only |
D) IV only
|
|
|
|
Correct Answer |
D |
|
5 |
How many distinct binary search trees can
be created out of 4 distinct keys? |
Options |
|
|
|
Correct Answer |
B |
|
6 |
Given the following input (4322, 1334,
1471, 9679, 1989, 6171, 6173, 4199) and the hash function x
mod 10, which of the following statements are true ?
(i) 9679, 1989, 4199 hash to the same value
(ii) 1471, 6171 hash to the same value
(iii) All elements hash to the same value
(iv) Each element hashes to a different value |
Options |
A) (i) only |
B) (ii) only
|
C) (i) and (ii) only |
D) (iii) or (iv) |
|
|
|
Correct Answer |
C |
|
7 |
Packets of the same session may be routed
through different paths in |
Options |
A) TCP, but not UDP |
B) TCP and UDP
|
C) UDP, but not TCP |
D) Neither TCP, nor UDP
|
|
|
|
Correct Answer |
B |
|
8 |
The following numbers are inserted into
an empty binary search tree in the given order: 10, 1, 3, 5,
15, 12, 16. What is the height of the binary search tree (the
height is the maximum distance of a leaf node from the root)? |
Options |
|
|
|
Correct Answer |
B |
|
9 |
Postorder traversal of a given binary
search tree, T produces the following sequence of keys
10, 9, 23, 22, 27, 25, 15, 50, 95, 60, 40, 29
Which one of the following sequences of keys can be the result
of an inorder traversal of the tree T? |
Options |
A) 9, 10, 15, 22, 23, 25, 27, 29, 40, 50, 60,
95 |
B) 9, 10, 15, 22, 40, 50, 60, 95, 23, 25, 27,
29 |
C) 29, 15, 9, 10, 25, 22, 23, 27, 40, 60, 50,
95
|
D) 95, 50, 60, 40, 27, 23, 22, 25, 10, 9, 15,
29 |
|
|
|
Correct Answer |
A |
|
10 |
Let f: B ®
C and g: A ® B be two
functions and let h = f o g. Given that h is an onto function.
Which one of the following is TRUE? |
Options |
A) f and g
should both be onto functions. |
B) f should be onto
but g need not be onto |
C) g should be onto
but f need not be onto |
D) both f and g
need not be onto |
|
|
|
Correct Answer |
B |
------------- For more papers visit:
http://onestopgate.com/gate-preparation/ - http://onestopgate.com/gate-preparation/
|