Professional Documents
Culture Documents
B.
x y xy x y
4 2
3
8 4 2
3
+
C.
x y x xy y
4 2 16 8 4
2 2
+
D.
1
8 2 4 2
2
2
x
y
x xy
y +
The function is
(a) independent of one variable
(b) independent of two variables
(c) independent of three variables
(d) dependent on all the variables
160. Consi der a 4-way set associ ati ve cache
consisting of 128 lines with a line size of 64 words.
The CPU generates a 20-bit address of a word in
main memory. The number of bits in the TAG,
LI NE and WORD fields are respectively
(a) 9, 6, 5 (b) 7, 7, 6
(c) 7, 5, 8 (d) 9, 5, 6
161. Consider a disk pack with 16 surfaces, 128 tracks
per surface and 256 sectors per track.
512 bytes of data are stored in a bit serial manner
in a sector. The capacity of the disk pack and the
number of bits required to specify a particular
sector in the disk are respectively
(a) 256 Mbyte, 19 bits (b) 256 Mbyte, 28 bits
(c) 512 Mbyte, 20 bits (d) 64 Gbyte, 28 bits
162. The height of a binary tree is the maximum
number of edges i n any root to l eaf path.
The maximum number of nodes in a binary tree
of height h is
(a) 2
h
(b) 2
h1
1
(c) 2
h+1
1 (d) 2
h+1
163. The maximum number of binary trees that can
be formed with three unlabeled nodes is
(a) 1 (b) 5
(c) 4 (d) 3
164. Which of the following sorting algorithms has the
lowest worst-case complexity ?
(a) Merge sort (b) Bubble sort
(c) Quick sort (d) Selection sort
165. Consider the following segment of C-code
int J , n;
j =1;
while (j <=n)
j =j* 2;
The number of compari sons made i n the
execution of the loop for any n >0 is
(a) log
2
1 n + (b) n
(c) log
2
n (d) log
2
1 n +
COMPUTER AWARENESS
File hosted by educationobserver.com/forum
12 ONLINE PRACTICE MOCK TEST PAPER I
166. Group 1 contains some CPU scheduling algorithms
and Group 2 contains some applications. Match
entries in Group 1 to entries in Group 2.
Group 1 Group 2
P. Gang Scheduling 1. Guaranteed Scheduling
Q. Rate Monotonic 2. Real-time Scheduling
Scheduling
R. Fair Share 3. Thread Scheduling
Scheduling
(a) P-3; Q-2; R-1 (b) P-1; Q-2; R-3
(c) P-2; Q-3; R-1 (d) P-1; Q-3; R-2
167. Consider the following statements about user
level threads and kernel level threads. Which one
of the following statements is FALSE ?
(a) Context switch time is longer for kernel level
threads than for user level threads.
(b) User level threads do not need any hardware
support
(c) Related kernel level threads can be scheduled
on different processors in a multiprocessor system
(d) Blocking one kernel level thread blocks all
related threads
168. Which one of the following is a top-down parser ?
(a) Recursive descent parser
(b) Operator precedence parser
(c) An LR(k) parser
(d) An LALR(k) parser
169. I n Ethernet when Manchester encoding is used,
the bit rate is
(a) Half the baud rate
(b) Twice the baud rate
(c) Same as the baud rate
(d) None of these
170. Which one of the following uses UDP as the
transport protocol ?
(a) HTTP (b) Telnet
(c) DNS (d) SMTP
171. How many different non-isomorphic Abelian
groups of order 4 are there ?
(a) 2 (b) 3
(c) 4 (d) 5
172. Let Graph(x) be a predicate which denotes that x
is a graph. Let Connected(x) be a predicate which
denotes that x i s connected. Whi ch of the
following first order logic sentences DOES NOT
represent the statement; Not every graph is
connected?
(a)
x
(Graph(x) Connected (x))
(b)
-
x (Graph(x) . Connected (x))
(c)
x( Graph(x)) vConnected(x))
(d)
x(Graph(x) Connected(x))
173. Which of the following graphs has an Eulerian
circuit ?
(a) Anyk-regular graph wherek is an even number
(b) A complete graph on 90 vertices
(c) The complement of a cycle on 25 vertices
(d) None of the above
174. Suppose we uniformly and randomly select a
permutation from the 20! permutations of 1, 2,
3...., 20. What is the probability that 2 appears at
an earlier position than any other even number
in the selected permutation ?
(a)
1
2
(b)
1
10
(c)
9
20
!
!
(d) None of these
175. Let A be a 4 4 matrix with eigenvalues 5, 2, 1,
4. Which of the following is an eigenvalue of
A
I
I
A
if and only if t
i
refines
t
j
. The poset digram for S' ,
(a) (b)
(c) (d)
177. Consider the set of (column) vectors defined by
X ={x e R
3
| x
1
+x
2
+x
3
=0, wherex
T
=[x
1
, x
2
, x
3
]
T
}.
Which of the following is TRUE?
(a) {[1, 1, 0]
T
, [1, 0, 1]
T
}is a basis for the subspace X.
(b) {[1, 1, 0]
T
, [1, 0, 1]
T
} i s a l i nearl y
independent set, but it does not span X and
therefore is not a basis of X
(c) X is not a subspace of R
3
(d) None of the above
File hosted by educationobserver.com/forum
ONLINE PRACTICE MOCK TEST PAPER I 13
178. Consider the series x
n +1
=
x
x
n
n
2
9
8
+
, x
0
=0.5
obtained from the Newton-Raphson method.
The series converges to
(a) 1.5 (b)
2
(c) 1.6 (d) 1.4
179. A minimum state deterministic finite automaton
accepting the language
L = { { , }
*
w w , e 0 1 , number of 0s and 1s in w are
divisible by 3 and 5, respectively}has
(a) 15 states (b) 11 states
(c) 10 states (d) 9 states
180. The languageL ={0
i
21
i
| i >0}over the alphabet
{0, 1, 2}is
(a) not recursive
(b) is recursive and is a deterministic CFL
(c) is a regular language
(d) is not a deterministic CFL but a CFL
181. Which of the following languages is regular ?
(a) { | {0,1} }
R +
ww we
(b)
ww x x w
R
, e
+
, { , } 0 1
(c)
wxw x w
R
, e
+
, { , } 0 1
(d)
xww x w
R
, e
+
, { , } 0 1
182. Let f(w, x, y, z) =
( , , , , , , , ) 0 4 5 7 8 9 13 15
. Which of
the following expressions are NOT equivalent tof ?
(a) x'y'z' +w'xy' +wy'z +xz
(b) w'y'z' +wx'y' +xz
(c) w'y'z' +wx'y' +xyz +xyz
(d) x'y'z' +wx'y' +w'y
183. Define the connective * for the Boolean variable
X and Y as : X* Y =XY +XY
Let Z =X * Z.
Consider the following expression P, Q and R.
P : X =Y * Z Q : Y =X * Z
R : X * Y * Z =1
Which of the following is TURE ?
(a) Only P and Q are valid
(b) Only Q and R are valid
(c) Only P and R are valid
(d) All P, Q, R are valid
184. Suppose only one multiplexer and one inverter
are allowed to be used to implement any Boolean
function of n variables. What is the minimum size
of the multiplexer needed?
(a) 2
n
line to 1 line (b) 2
n +1
line to 1 line
(c) 2
n 1
line to 1 line (d) 2
n2
line to 1 line
185. I n a look-ahead carry generator, the carry
generate function G
i
and the carry propagate
function P
i
for inputs, A
i
and B
i
are given by :
P A B
i i i
= and G A B
i i i
=
The expressions for the sum bit S
i
and the carry
bit C
i+1
of the look-ahead carry adder are given
by:
S P C
i i i
=
and C G PC
i i i i +
= +
1
,
where C
0
is the input carry.
Consider a two-level logic implementation of the
look-ahead carry generator. Assume that all P
i
andG
i
are available for the carry generator circuit
and that the AND and OR gates can have any
number of inputs. The number of AND gates and
OR gates needed to implement the look-ahead
carry generator for a 4-bit adder with S
3
, S
2
, S
1
,
S
0
and C
4
as its outputs are respectively
(a) 6, 3 (b) 10, 4
(c) 6, 4 (d) 10, 5
186. The control signal functions of a 4-bit binary
counter are given below (where X is dont care):
Clear Clock Load Count Function
1 X X X Clear to 0
0 X 0 0 No change
0 | 1 X Load input
0 | 0 1 Count next
The counter is connected as follows :
Assume that the counter and gate delays are
negligible. I f the counter starts at 0, then it cycles
through the following sequence
(a) 0, 3, 4 (b) 0, 3, 4, 5
(c) 0, 1, 2, 3, 4 (d) 0, 1, 2, 3, 4, 5
187. Consider a pipelined processor with the following
four stages :
I F : I nstruction Fetch
I D : I nstruction Decode and Operand Fetch
EX : Execute
WB : Write Back
The I F, I D and WB stages take one clock cycle
each to complete the operation. The number of
clock cycles for the EX stage depends on the
instruction. The ADD and SUB instructions need
1 clock cycle and the MUL instruction need 3
clock cycles in the EX stage. Operand forwarding
is used in the pipelined processor. What is the
File hosted by educationobserver.com/forum
14 ONLINE PRACTICE MOCK TEST PAPER I
number of clock cycles taken to complete the
following sequence of instructions ?
ADD R2, R1, R0 R2 R1 +R0
MUL R4, R3, R2 R4 R3 * R2
SUB R6, R5, R4 R6 R5 R4
(a) 7 (b) 8
(c) 10 (d) 14
188. The following postfix expression with single digit
operands is evaluated using a stack
8 2 3 ^/ 2 3 * +5 1*
Note that ^ is the exponentiation operator.
The top two elements of the stack after the first
* is evaluated are
(a) 6, 1 (b) 5, 7
(c) 3, 2 (d) 1, 5
189. The inorder and preorder traversal of a binary
tree are
d b e a f c g and a b d e c f g respectively.
The postorder traversal of the binary tree is
(a) d e b f g c a (b) e d b g f c a
(c) e d b f g c a (d) d e f g b c a
190. Consider a hash table of size seven, with starting
index zero, and a hash function (3x +4) mod 7.
Assuming the hash table is initially empty, which
of the following is the contents of the table when
the sequence 1, 3, 8, 10 is inserted into the table
using closed hashing ? Note thatdenotes an
empty location in the table.
(a) 8, , , , , , 10 (b) 1, 8, 10, , , , 3
(c) 1, , , , , , 3 (d) 1, 10, 8, , , , 3
191. I n an unweighted, undirected connected graph,
the shortest path from a mode S to every other
node is computed most efficiently, in terms of time
complexity, by
(a) Dijkstras algorithm starting from S.
(b) Warshalls algorithm
(c) performing a DFS starting from S
(d) performing a BFS starting from S
192. Consider the following C function :
int f(int n)
{static int r =0;
if (n <=0) return 1;
if (n >3)
(r =n;
return f (n2) +2;
}
return f(n1) +r;
}
What is the value of f(5) ?
(a) 5 (b) 7
(c) 9 (d) 18
193. A complete nary tree is a tree in which each
node has n children or no children. Let. I be the
number of internal nodes and L be the number
of leaves in a completen-ary tree. I f L =41, and
I =10, what is the value of n
(a) 3 (b) 4
(c) 5 (d) 6
194. I n the following C function, let n
>
m.
int gcd(n,m)
{
if(n%m ==0) return m;
n =n%m;
return gcd(m,n);
}
How many recursive calls are made by this
fucntion ?
(a) O (log
2
n) (b) O (n)
(c) O log log
2 2
n (d)
O n
,
195. What is the ti me compl exi ty of the following
recursive function :
int DoSomething ( int n) {
if (n <=2)
return 1;
else
return (DoSomething (floor (sqrt(n))) +n);
}
(a)
O n
2
, (b) O n n log
2
(c) O log
2
n (d) O log log
2 2
n
196. Consider the following C program segment where
Cell Node represents a node in a binary tree
struct CellNode {
struct CellNode * leftchild;
int element;
struct CellNode *rightchild;
};
int GetValue(struct CellNode*ptr){
int value =0;
if (ptr ! =NULL) {
if ((ptr->leftChild ==NULL) &&
(ptr->rightChild ==NULL))
value =1;
else
value =value +GetValue(ptr->leftChild)
+GetValue
(ptr->rightChild);
}
return(value);
}
File hosted by educationobserver.com/forum
ONLINE PRACTICE MOCK TEST PAPER I 15
The value returned by Get Value when a pointer to
the root of a binary tree is passed as its argument is
(a) the number of nodes in the tree
(b) the number of internal nodes in the tree
(c) the number of leaf nodes in the tree
(d) the height of the tree
197. Consider the process of inserting an element into
aMax Heap, where theMax Heap is represented
by an array. Suppose we perform a binary search
on the path from the new leaf to the root to find
the position for the newly inserted element, the
number of comparisons performed is
(a) O log
2
n (b) O log log
2 2
n
(c) On (d) O n n log
2
198. Which of the following is TRUE about formulae
in Conjunctive Normal Form ?
(a) For any formula, there is a truth assignment for
which at least half the clauses evaluate to true.
(b) For any formula, there is a truth assignment
for a which all the clauses evaluate to true.
(c) There is a formula such that for each truth
assignment at most one-fourth of the clauses
evaluate to true.
(d) None of the above
199. Let w be the minimum weight among all edge
weights in an undirected connected graph. Let e
be a specific edge of weight w. Which of the
following is FALSE ?
(a) There is a minimum spanning tree containinge.
(b) I f e is not in a minimum spanning treeT, then
in the cycle formed by addinge toT, all edges
have the same weight.
(c) Every minimum spanning tree has an edge of
weight w
(d) e is present in every minimum spanning tree
200. An array of n numbers is given, where n is an
even number. The maximum as well as the
mi ni mum of these n numbers needs to be
determined. Which of the following is TRUE
about the number of comparisons needed ?
(a) At l east 2n c compari sons, for some
constant c, are needed.
(b) At most 1.5n 2 comparisons are needed.
(c) At least n log
2
n comparisons are needed.
(d) None of the above.
ANSWERS
1.(b) 2. (c) 3.(d) 4.(d) 5.(a) 6.(a) 7.(d) 8.(b) 9. (c) 10.(a)
11.(d) 12.(b) 13.(b) 14.(d) 15.(c) 16.(a) 17.(c) 18.(b) 19.(c) 20.(c)
21.(b) 22.(d) 23.(a) 24.(b) 25.(d) 26.(c) 27.(a) 28.(d) 29.(d) 30.(c)
31.(a) 32.(c) 33.(c) 34.(a) 35.(c) 36.(b) 37.(d) 38.(a) 39.(d) 40.(d)
41. (d) 42. (d) 43. (b) 44. (d) 45. (d) 46. (b) 47. (d) 48. (c) 49. (a) 50. (d)
51.(d) 52.(d) 53.(c) 54.(b) 55.(a) 56.(a) 57.(d) 58.(c) 59.(a) 60.(d)
61.(b) 62.(c) 63.(a) 64.(d) 65.(a) 66.(a) 67.(c) 68.(d) 69.(d) 70.(c)
71.(a) 72.(d) 73.(b) 74.(c) 75.(c) 76.(a) 77.(a) 78.(d) 79.(c) 80.(b)
81.(d) 82.(d) 83.(a) 84.(a) 85.(d) 86.(c) 87.(a) 88.(c) 89.(d) 90.(a)
91. (b) 92. (c) 93. (d) 94. (d) 95. (d) 96. (a) 97. (a) 98. (d) 99. (c) 100. (d)
101.(c) 102.(c) 103.(a) 104.(d) 105.(a) 106.(c) 107.(b) 108.(a) 109.(d) 110.(d)
111.(c) 112.(b) 113.(c) 114.(d) 115.(b) 116.(b) 117.(d) 118.(b) 119.(d) 120.(a)
121.(a) 122.(c) 123.(d) 124.(b) 125.(c) 126.(d) 127.(b) 128.(c) 129.(a) 130.(b)
131.(b) 132.(a) 133.(d) 134.(c) 135.(a) 136.(a) 137.(d) 138.(a) 139.(d) 140.(d)
141. (d) 142. (a) 143. (a) 144. (d) 145. (d) 146. (c) 147. (d) 148. (d) 149. (c) 150. (c)
151.(a) 152.(b) 153.(c) 154.(b) 155.(d) 156.(b) 157.(b) 158.(b) 159.(b) 160.(b)
161.(a) 162.(c) 163.(b) 164.(a) 165.(d) 166.(a) 167.(d) 168.(a) 169.(b) 170.(c)
171.(b) 172.(d) 173.(a) 174.(d) 175.(d) 176.(c) 177.(b) 178.(a) 179.(a) 180.(b)
181.(c) 182.(d) 183.(d) 184.(c) 185.(c) 186.(d) 187.(b) 188.(a) 189.(a) 190.(b)
191.(d) 192.(d) 193.(c) 194.(c) 195.(d) 196.(c) 197.(a) 198.(b) 199.(d) 200.(d)