Escolar Documentos
Profissional Documentos
Cultura Documentos
co
Solutions
1. Ans. B. 6. Ans. A.
~ p q ~ r v ~ s # has the property of xor operation.
So x#y = xy’+x’y
~ p q ~ r ~ s
~ p q r s 7. Ans. D.
1111 1111 1111 0101
~ ~ p q r s 2’s complement 0000 0000 0000 1011
p ~ q r s 11 and 1st bit is 1.
So result is -11
For x 11 only the above compound preposition is true.
8. Ans. C.
2. Ans. B.
0->1->0->2->0->3
Case I First bit is ‘0’
0000->0001->0100->0010->1000->0011
There are 6 states and 3 of them correspond to same
state.
To differentiate between 0,1,2,3 we need 2 bits.
To differentiate between 3 0's we need 2 bits.
So Total 4 bits required =4 FF
an an 1 an 2 10. Ans. A.
Both ENQUEUE and DEQUEUE can be performed in O(1)
time using circular array.
3. Ans. B.
sin x 4 11. Ans. D.
lim
x 4 x4 abcdef
sin x 4 adebcf
lim abdcef
x 4 0 x4
adbcef
sin y
lim
x y y
By taking y x 4 abdecf
adbecf
1
12. Ans. D.
4. Ans. A. Here function f takes two arguments one is int and the
1 other is short and its return type is void. So, in main
f x x a, 1 function ‘P’ is a pointer to short and when we call f (i,*p)
Given x2
there won’t be any type checking error.
0 other wise
'
We know that f x dx 1
a
13. Ans. D.
1 Merge sort n log n in all the cases
1 ' 1
a x2
dx 1 1
x a Quick sort n log n best case and n2 worst cases
1
1 1
Insertion sort n best case R n 2
worst case
a
a 0.5 14. Ans. A.
5. Ans. B.
Given that 2 1 and 3 are two Eigen values of 3 3
real matrix is, 2 i and 3 are Eigen values.
But 2-i also Eigen values (complex roots occurs in pair
only)
det = Product of Eigen values
2 i 2 i 3 5 3 15
1|Page
www.gradeup.co
3
increased by same value as shown in above.
x9 1 x
1
15. Ans. B. x9 1 x
3
2 99 4 99 2 99 2
2
19. Ans. A.
x1 = u - t;
y1 = x1 * v; 100 12 2 100 1 100 1 104
x2 = y1 + w;
y2 = t - z; 198 K 104
y3 = x * y2; K 198
So, we require total 10 variables in SSA form of the given
code. 28. Ans. A.
n
20. Ans. A. Given f n f is n is even
SRTF is pre-emptive SJF which produces less average 2
waiting time. f n 5 if n is odd
We can observe that
21. Ans. B.
Any superset of VY is a super key. f 1 f 2 f 3 f 4 f 6 f 7 ..... and
f 5 f 10 f 15 .............
22. Ans. D.
‘D’ means durability not deadlock freedom. Clearly, the range of f(x) will contain two distinct
elements only.
23. Ans. A.
candidate key is (volume, number, start page, end page) 29. Ans. A.
(Volume number) → year is a partial dependency. So From the given steps we can observe that probabilities of
original table is in 1NF but not in 2NF y are
2
1 11 1 1
, , ,.......
24. Ans. C. 4 44 4 4
Except DHCP, remaining all the protocols are used to Required probability
resolve one form of address to another one.
1 1 1 1 1
2
....
25. Ans. C. 4 4 4 4 4
FTP and POP 3are stateful application layer protocols 2 3
1 1 1
...
26. Ans. A. 4 4 4
x
3
3
x 4 x5 x6 ...
2|Page
www.gradeup.co
1 1 1
2
38. Ans. A.
1 ...
4 4 4
1 1 1 4 1
0.33
4 1 4 3 3
1
4
31. Ans. B.
DMA controller needs
29154kB
16 455.53125 456
2 byte
44. Ans. C.
Y reduces to W and we know Y is Recursively enumerable
but not recursive, so W is not recursively enumerable.
Z reduces to X and we know X is recursive language,
then Z is also recursive language.
45. Ans. C.
2 5 1 7*3
2 5 1 7 * 3
Output is 3 1 2 2 1 3 4 4 4
2 6 7*3
36. Ans. D. 2 6 7 * 3
Dynamic scoping looks for the definition of free variable
2 1 * 3
in the reverse order of calling sequence.
2 1 * 3
37. Ans. B.
3*3 9
Time complexity of heapification is O (height) = O(d)
3|Page
www.gradeup.co
46. Ans. C.
52. Ans. B.
49. Ans. B.
a1, a2 ,....a20 , a1, a2 ,......a20
53. Ans. B.
54. Ans. B.
For first a1 to a20 20 page fault Given
C 1 Mb
Now a1 to a9 Hit
Max Output rate = 20 Mbps
again a10 to a20 replace only 9th position, so 11 page Arrival rate = 10 Mbps
fault. ∴ The minimum time required to transmit the data is
So total 31 page fault c
S
mp
4|Page
www.gradeup.co
LA 100 Bytes
Ack TA
BR 1 103 BPS
100 ms
Tp 100 ms
***
5|Page