1.
If
two 8 bit numbers -60 and -68 are added using two’s complement arithmetic, it
will result in :
A)
carry
B)
Overflow
C)
-128
D)
0
2.
Consider
a memory system in which main memory has a acces time of 120ns and cache memory
has access time of 20 ns what should be the hit ratio, if effective memory
access has to be 44ns:
A)
0.8
B)
0.85
C)
0.9
D)
0.95
3.
An
8085 based microprocessor sends either a 0 or 1 through the SOD line depending
upon the outcome of a test. It takes 25 instructions to perform the test and
set the output to the appropriate level. If the average time taken for each
instruction is 2 µsec, the rate at which the bits are transmitted is :
A)
20
Kbps
B)
2
Kbps
C)
10
Kbps
D)
25
Kbps
4.
P
is a 16 bits signed integer. Two’s compliment representation of P is (F871)16
. Two’s compliment of 8*P is :
A)
(F3F8)16
B)
(C3F8)16
C)
(1871)16
D)
(987b)16
5. What
would be the speed of a processor in terms instructions per second if the
processor has two types of instructions A and B. type A instructions takes 18
clock cycles and type B instructions takes * clock cycles. Programs on an
average used 20 % of type A and 80% of type B instructions. The clock rate is
of 1 GHz.
A)
1000
MIPS
B)
10
MIPS
C)
100
MIPS
D)
10000
MIPS
6. Given
that the ASCII code for the character “A” is 1000001, the ASCII code for “I”
would be?
A)
1010101
B)
1110101
C)
1000100
D)
1001001
7. Booth’s
algorithm is used to _________ signed numbers(2’s Complement):
A)
Add
B)
Subtract
C)
Multiply
D)
Divide
8.
Which
of the following is not an addressing mode?
A)
Immediate
mode
B)
Indirect
mode
C)
Register
mode
D)
Hashing
mode
9. In
which addressing mode, the effective
address of the operand is generated by adding a constant value to the contents
of a register:
A)
Index
mode
B)
Autoincrement
mode
C)
Immediate
mode
D)
Indirect
mode
10. ________ allows data transfer between
the device and the main memory without involving the processor:
A)
IO
Processor
B)
DMA
C)
Cache
Memory
D)
Stack
Processor
11. Which of the following is true about a
normalization floating point number, where |M| is the magnitude of the
mantissa?
A)
½<|M|≤1
B)
½
≤ |M|<1
C)
0<
|M|<1
D)
0≤|M|<1
12. A 4 bit biased base -2 exponent is used
to represent a floating point number. What would be the representation of an
mantissa?
A)
0111
B)
1111
C)
0001
D)
1000
13. What is the number of clock that it
takes to process 200 tasks in a six-segment pipeline?
A)
200
B)
204
C)
205
D)
206
14. Consider the following recursive C
function that takes two arguments
Unsigned int test(unsigned int n, unsigned int r) {
If (n>0) return ((n%r)+test(n/r.r));
Else return 0;
}
What is the return
value of the function test when it is called as test(125, 10) ?
A)
125
B)
8
C)
5
D)
3
15. Which of the following is a wrong
statement about lifetime of a variable?
A)
A
global variable’s lifeline is the program’s run-time.
B)
A
heap variable’s lifetime is limited to a block
C)
A
local variable’s lifetime is in an activation of a block
D)
A
persistent variable lifetime is arbitrary, and may transcend the run-time of
any particular program
.
.
16. Consider the following C++ Code:
Void test(float&
v1, float& v2, float v)
{
V1-=v;
V2+=v;
}
Further x,y and z are
set to 4.0,6.0 and 1.0 respectively, and the above procedure is invoked by the
call test(x,y,x). which of the following statement best describes the above
scenario?
A)
The
invocation results in dangling pointer problem
B)
The
invocation results in aliasing problem
C)
The
invocation results in side effect
D)
The
invocation results in run-time error
17. Consider he following piece of code:
integer f(x: integer)
{
Y: = y+1;
F: = y+x
}
This function ‘f’ in
addition to computing a value also changes the value of the global variable y.
he changes to global variable ‘y’ is known as:
A)
Domino
effect
B)
Side
effect
C)
Local
effect
D)
Global
effect
18. If a programmer deallocates a heap
variable, any remaining pointer to the deleted heap variable are known as:
A)
Leftover
references
B)
Null
references
C)
Dangling
references
D)
Zero
references
19. Which of the following statement is
true/
A)
Early
binding refers to events that occur early part of execution of the program
B)
Early
binding refers to the events that occurs during loading time
C)
Early
binding refers to events that occurs during compile time
D)
Virtual
function is an example of early binding
20. Consider the following c declaration
int (*f)();
which of the following statement correctly
interprets the above declaration?
A)
f
is a function which returns an integer.
B)
f
is a function which returns a pointer to an integer
C)
f
is a function pointer which returns an integer.
D)
f
is pointer to a function which returns an integer
21. Consider the following C program:
main()
{
char a[3][3] = { {
‘a’,’b’,’c’},{‘d’,’e’,’f’}, {‘g’,’h’,’i’}};
char 8p;
printf(“%c\n”,(a+2)[0][0]);
}
What would be the
output of the abouve program?
A)
a
B)
d
C)
c
D)
g
22. Consider
the following AVL tree with array representation:
44 17 78 X32 50 88 X X X X 48 62 X X
Which
of the following represents AVL tree after inserting a key element 54
A) 44 17 78 X 32 50 62 X X X X 48 54 X 88
B) 44 17 62 X 32 50 78 X X X X 48 54 88 X
C) 44 17 62 X 32 50 78 X X X X 48 88 X 54
D) 44 17 62 X 32 50 78 X X X X 48 54 X 88
23. A merge sort is used to sort an array of
100 test scores in descending order. Which of the following statements is true?
A)
The
sort is fastest if the original test scores are in order from smallest to
largest
B)
The
sort is fastest if the original test scores are in completely random
C)
The
sort is fastest if the original test scores are in the order from largest to
smallest
D)
The
sort is same irrespective of the order of elements
24. Which of the formulas gives the maximum
number of nodes in the nth level of a binary tree (root is at level
0) ?
A)
n2
B)
2n
C)
2n+1
D)
2n-1
25. Which of the following is the correct
sequence of the statements to be executed to insert a node in a singly linked
list after a node whose address is p? the pointer field netptr points
To the next node and
the address of the new node is q.
A)
pànextptr=q;
qànextptr=p;
B)
pànextptr=q;
qànextptr=pànextptr;
C)
qànextptr=pànextptr;
pànextptr=q;
D)
qànextptr=pànextptr;
pànextptr=qànextptr;
26. AVL tree has search and insertion times
of the order:
A)
O(log
n),O(n)
B)
O(log
n),O(log n)
C)
O(n),O(n)
D)
O(n),
O(log n)
27. A binary search tree may become skewed
when the keys arrive:
A)
Randomly
B)
Sparsely
C)
In
an ascending order
D)
Slowly
28. Consider the following list of elements:
10,20,30,40,50,60,70,80,90.
What will be the two
lists after partition of quick sort algorithm?
A)
10;
20, 30,40,50,60,70,80,90
B)
10,20,30,40;
50,60,710,80,90
C)
10,20,30,40,50;
60,710,80,90
D)
50,60,70,80,90;10,20,30,40
29. Consider the sequential representation
of a heap:
10
|
9
|
8
|
7
|
6
|
5
|
2
|
1
|
4
|
3
|
What would be the
representation of heap after element 10 is removed from the heap?
A)
9
|
8
|
7
|
4
|
6
|
5
|
2
|
1
|
3
|
B)
3
|
9
|
8
|
7
|
6
|
5
|
2
|
1
|
4
|
C)
8
|
9
|
7
|
4
|
6
|
5
|
2
|
1
|
3
|
D)
9
|
7
|
8
|
4
|
6
|
5
|
2
|
1
|
30
|
30. Which of the following represents the
reverse polish of a+(b/c)*d?
A)
abc/d+*
B)
abc/d*+
C)
abc/+d*
D)
ab/cd+*
31. The following postfix expression with
single digit operands is evaluated using a stack
5 6 2 ^3 * 2 – 7 4/ +
Note that ^ is the
exponentiation operator. The top two elements of the stack after the * is
evaluated are:
A)
3,
5
B)
108,
5
C)
108,
3
D)
112,
2
32. Let G be a graph with n vertices and m
edges represented with the adjacency list structure.
Which of the following
are the time complicities for G’s DFS travel and BFS travel respectively?
A)
O(nm),
O(nm)
B)
O(n+m),
O(nm)
C)
O(nm),
O(n+m)
D)
O(n+m),
O(n+m)
33. Consider the following recurrence
relation, defining T(n), as
T(n)= 4, if n=1, and
T(n)= T(n-1)+4,
otherwise
What will be T(n) in
Big-O notation?
A)
O(n2)
B)
O(n3)
C)
O(n)
D)
O(logn)
34. Read the following statement:
“All the operations
used in the algorithm are basic and are a capable of being performed
mechanically.”
Which property of an
algorithm is defined by above statement?
A)
Completeness
B)
Effectiveness
C)
Definiteness
D)
Finiteness
35. Assuming P≠NP, which of the following is
TRUE?
A)
NP-complete
=NP
B)
NP-complete
∩ P=ø
C)
NP-hard
=NP
D)
P=NP-complete
36. Consider the following times of an
algorithm:
T(0)=c, T(n)=a n + b + T(n-1),
where a, b and c are constants.
What would be the value
of O(T(n))?
A)
log
n
B)
n
log n
C)
O(n3)
D)
O(n2)
37. The time taken by Dijkstra’s of finding
the shortest path from vertex V1 to each of the other vertex V2,
V3,……. Vn is:
A)
O(2n)
B)
O(n3)
C)
O(n2)
D)
O(n
log n)
38. The process of defining a problem in
term of few steps and then exploring each of the steps future is known as :
A)
Step-wise
refinement
B)
Modularization
C)
Integration
D)
Divide
and Conquer
39. If prime’s algorithm is used for finding
a spanning tree of a given graph G, which of the following algorithm approach is being used?
A)
Divide-and-Conquer
B)
Greedy
C)
Dynamic
Programming
D)
Branch-and-Bound
40. The recurrence relation capturing the
optimal execution time of the tower of Hanoi problem with n disc is
A)
T(n)=2T(n-2)+2
B)
T(n)=2T(n-1)+n
C)
T(n)=2T(n/2)+2
D)
T(n)=2T(n-1)+1
41. Consider the language frog. Let {F,G} be
the setoff non-terminals, {r, I, b, t} be the set of terminals, and the grammar
definition be:
F : : =rF|iG
G :: = bG|bF|t
Which of the following
term is not part of language Frog?
A)
ibit
B)
ribbit
C)
ribibibbbit
D)
rct
42. Which of the problems are decidable?
(i)
Does
a given problem ever produce an output?
(ii) If L is
context-free language, then, is L also context-free?
(iii) If L is regular
language, then, isL also regular?
(iv) If L is recursive
language, then, is L also recursive?
A)
(i),
(ii),(iii),(iv)
B)
(i),
(ii)
C)
(ii),(iii),(iv)
D)
(iii),(iv)
43. Which of the following machines
recognizes the even palindrome of the form WWR ( W=word and WR
being its reverse)?
A)
DFSM(
Deterministic FSM)
B)
NFSM(
Non-Deterministic FSM)
C)
DPDM(Deterministic
PDM)
D)
NPDM(Non-Deterministic
PDM)
44. An algorithm to find the length of the longest
monotonically increasing sequence of numbers in an array A[0: n-1} is given
below.
Let Li denotes
the length of the longest monotonically increasing sequence starting at index i
in the array. Initially Ln-1 =1, for all I such that 0 n ≤ n-2
Li =1+ Li+1
, ifA[i]< A[i+1]
Li =1,
otherwise
Finally the length of
the longest monotonically increasing sequence is maximum.
Which of the following
statements is TRUE?
A)
The
algorithm used dynamic programming paradigm
B)
The
algorithm has a linear complexity and usesbranch and bound paradigm
C)
The
algorithm has a non-linear polynomial complexity and uses branch and bound
paradigm
D)
The
algorithm uses divide and conquer paradigm
45. The grammar with the productions:
SaàaA/bB, Bàb, Aàε (ε-epsilon)
belongs to
A)
Regular
grammar only
B)
Context
free grammar only
C)
Regular
and context free only
D)
Context
sensitive only
46. Which languages necessarily need heap
allocation in he runtime environment?
A)
Those
that support recursion
B)
Those
that use dynamic scoping
C)
Those
that allow dynamic data structure
D)
Those
that use global variables
47. Consider the grammar G=(N,T,P,A) where
N={A,B,C}
T={a, b, c}
P={(AàAB), (ABàAC), (CàabA)}
Which of the following
is true about G?
A)
G
is context-free
B)
G
is regular
C)
G
is context-sensitive
D)
G
is Type 3
48. Which data structure in a compiler used
to maintain the variables and their attributes?
A)
Abstract
Syntax Tree
B)
Symbol
Table
C)
Semantic
Stack
D)
Parse
Tree
49. A CFG is ambiguous if:
A)
The
grammar consists useless Non-Terminals
B)
It
produces more than one parse tree for some sentence
C)
Some
productions have two Non-Terminals side by side
D)
The
grammar consists only terminals on the right side
50. Consider the following grammar G:
G= ({S},?{a, b},P,S)
Where
P = { (SàaSb), (Sàa)}
Which of the following
statement is true about G?
A)
G
is LL(1)
B)
G
is LR(1)
C)
G
is LR(2)
D)
G
is LL(2)
51. Which of the following is a top-down
parser?
A)
Predictive
recursive descent
B)
Shift
–reduce
C)
Canonical
LR(1)
D)
LALR(1)
52. Which of the following statement is true
about LR(k) grammars?
A)
They
produce left most derivations by looking k symbols a head
B)
They
build the parse tree in a top-down
approach
C)
They
build the parse tree in a bottom-up approach
D)
They
scan the sentence from right to left.
53. Consider the following table of arrival
time and burst time for three processes P0,P1 and P2
Process
|
Arrival time
|
Burst time
|
P0
|
0 ms
|
9 ms
|
P1
|
1ms
|
4 ms
|
P2
|
2 ms
|
5 ms
|
The pre-emptive shortest job first scheduling
algorithm is used. Scheduling is carried out only at arrival or completion of
processes. What is the average waiting time for the three processes?
A)
2
ms
B)
4
ms
C)
5
ms
D)
7
ms
54. When does the condition ‘rendezvous’
arise?
A)
In
message passing, it is the consider in which, both, the sender and receiver are
blocked until the message is delivered
B)
The
condition where CPU is not engaged in any real productive activity during this
period, and he process does not progress
towards completion
C)
This
happens in virtual memory schemes, when the processor spends most of its time
swapping pages, rather than executing instructions
D)
Is
used during synchronization between two processes where a process is made to
wait for another process to complete
55. Let the page fault service time be 10 ms
in a computer with average memory access time being 10 ns. If one page fault is
generated for every 106 memory accesses, what is the effective
access time for the memory?
A)
21ms
B)
30 ms
C)
20 ms
D)
35 ms
56. Q virtual memory has a page size of 1 K
words. There re eight pages and four blocks. The associate memory page table
contains the following entities:
Page
|
Block
|
0
|
3
|
1
|
1
|
4
|
2
|
6
|
0
|
Which of the following
address causes a page fault ?
A)
1024
B)
2048
C)
4090
D)
4091
57. Let the time taken to switch between
user and kernel modes of execution be t1 while the time taken to
switch between two processes be t2. Which of the following is TRUE?
A)
t1
= t2
B)
t1
< t2
C)
t1
> t2
D)
nothing
can be said about the relation between t1 and t2
58. Consider the virtual page reference
string 1,2,3,2,4,1,3,2,4,1 on a demand paged virtual memory system running on a
computer system that has main memory size of 3 pages frames which are initially
empty. Let LRU, FIFO and OPTIMAL denoted the number of pages faults under the
corresponding page replacement policy. Then :
A)
OPTIMAL
<LRU<FIFO
B)
OPTIMAL<FIFO<LRU
C)
OPTIMAL=LRU
D)
OPTIMAL=FIFO
59. A thread is usually defined as a “ light
weight process” because an operating system (OS) maintains smaller data
structures for a thread than for a process. In release to this, which of the
following is TRUE?
A)
On
per-thread basis, the OS maintains only CPU register state
B)
The
OS does not maintain a separate stack for each thread
C)
On
per-thread basis, the OS does not maintain virtual memory state
D)
On
per-thread basis, the OS maintains only scheduling and accounting information
60. A file system with300 GByte disk uses a
file descriptor with 8 direct block addresses, 1 indirect block address and 1
doubly indirect block address. The size of each disk block is 128 byte and the
size of each disk block address is * bytes. The maximum possible file size in
this file system is:
A)
3
Kbytes
B)
35
Kbytes
C)
280
Kbytes
D)
Dependent
on the size of the disk
61. _____ is the time for the disk arm to
move the heads tio the cylinder containing the desired sector:
A)
Seek
time
B)
Rotational
latency
C)
Response
time
D)
Waiting
Time
62. ______is responsible for maintaining all
the important abstractions of the OS including such things as virtual memory
and processes.
A)
System
libraries
B)
Kernel
C)
Shell
D)
Utilities
63. Which of the following page replacement
algorithms suffers from Balody’s anomaly?
A)
Optimal
replacement
B)
LRU
C)
FCFS
D)
Second
Chance
64. Which of the following statements is
true about working-set model?
A)
It
prevents deadlock
B)
It
prevents starvation
C)
It
prevents race condition
D)
It
prevents thrashing
65. When making corrections to the INVENTORY
table you would use the following command
A)
CHANGE
INVENTORY
SET P_INDATE
=’01/18/2002’
WHERE P_CODE
=’13-Q2/P2’;
B)
ROLLBACK
INVENTORY
SET P_INDATE
=’01/18/2002’
WHERE P_CODE
=’13-Q2/P2’;
C)
EDIT
INVENTORY
SET P_INDATE
=’01/18/2002’
WHERE P_CODE
=’13-Q2/P2’;
D)
UPDATE
INVENTORY
SET P_INDATE
=’01/18/2002’
WHERE P_CODE
=’13-Q2/P2’;
66. Which of the following statement is
incorrect?
A)
A
relation always can be decomposed into dependency preserving BCNF
B)
A
relation in 3NF may have some redundancies
C)
If
the decompositions is dependency preserving all functional dependencies can be
derived from the individual relations
D)
There
are relations for which there is no dependency preserving BCNF decomposition
67. A table where all attribute are
dependent on the primary key and are independent of each other, and no row
contains two or more multivalued facts about an entity, is said to be in:
A)
1NF
B)
2NF
C)
3NF
D)
4NF
68. The ________ establishes the order in
which the operations within concurrent transactions are executed
A)
Transaction
log
B)
Timer
C)
Lock
manager
D)
Transaction
scheduler
69. In the context of a database table, the
statement “ A determines B” indicates that:
A)
Knowing
the value of attribute A you can not look up the value of attribute B.
B)
You
do not need to know the value of attribute A in order to look up the value of
attribute B.
C)
Knowing
the value of attribute B you can look up the value of attribute A
D)
Knowing
the value of attribute a you can look up the
value of attribute B.
70. A candidate key selected to uniquely
identify all other attributes values in any given row, and can not have a null
value is called a:
A)
Super
key
B)
Candidate
key
C)
Primary
key
D)
Secondary
key
71. ANSI-standard SQL allows the use of
special operators in conjunction with the WHERE clause. A special operator used
to check for similar character strings is :
A)
BETWEEN
B)
IS
NULL
C)
LIKE
D)
IN
72. To list a unique value for vender
code(V_CODE), where the list will produce only a list of those values that are
different from one another, you will write the command:
A)
SELECT
ONLY V_CODE
FROM PRODUCT;
B)
SELECT
UNIQUE V_CODE
FROM PRODUCT;
C)
SELECT
DIFFERENT V_CODE
FROM PRODUCT;
D)
SELECT
DISTINCT V_CODE
FROM PRODUCT;
73. Which of the following statement is
corrected about serializability:
A)
Checking
for view serializability is np-complete
B)
Checking
for conflict serializability is np-complete
C)
2PL
ensures view serializability
D)
Serialization
graph ensures view serializability
74. Which of the following statement is
correct statement?
A)
3PL
protocol ensures conflict serializability
B)
Strict
2PL is not cascadeless
C)
Strict
2PL is not recoverable
D)
2PL
is free from deadlocks
75. Which one of the following is NOT
desired in a good Software Requirement specifications (SRS) document?
A)
Functional
Requirement
B)
Non-Functional
Requirement
C)
Design
Constraints
0 comments:
Post a Comment