There is a 60% increase in amount in 3 years and simple interest. What will be the compound interest of Rs.8000 after 3 years at the same interest?
Rs.5628
Rs.3872
Rs.5824
Rs.3972
Correct Answer
Option 3
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
If one-fourth of one-third of a number is 25, then two-tenth of that number is _____
60
300
120
45
Correct Answer
Option 1
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Tickets numbered from 1 to 45 are mixed up and then a ticket is drawn at random. What is the probability that the ticket drawn has a number which is multiple of 4 (or) 5?
11/45
7/45
2/5
8/15
Correct Answer
Option 3
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A dishonest dealer purchases goods at 20% discount of the cost price of Rs.x and also cheats his wholesaler by getting 20% extra through false weighing, per kg. Then he marks up his goods by 80% of x, but he gives a discount of 25% besides he cheats his customer by weighing 10% less than the required. What is his overall profit percentage?
120%
80%
125%
135%
Correct Answer
Option 3
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A man covered a certain journey by a bus. If he covered 25% of the distance at the speed of 10 kmph, 45% of the distance at 30 kmph and remaining of the distance at 15 kmph, then his average speed is?
16.66 km/h
18.33 km/h
17.37 km/h
14.67 km/h
Correct Answer
Option 1
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
In triangle ABC length of the side BC is less than twice the length of the side AB by 4 cm length of the side AC exceeds the length of the side AB by 8 cm. The perimeter is 36 cm. The length of the smallest side of the triangle ABC is?
8 cm
6 cm
16 cm
14 cm
Correct Answer
Option 1
Solution
Perimeter = 36 cm
AB + BC + AC = 36 -------(i)
⟶ From the question, we know
BC = 2AB - 4 -------(ii)
AC = AB + 8 -------(iii)
⟶ Put (ii) and (iii) in (i), we get
(AB) + (2AB - 4) + (AB + 8) = 36
4AB = 32
AB = 8
BC = 12
AC = 16
∴ Smallest side is AB = 8 cm
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
' They have written 3 letters already.'
What is the tense of the sentence given above?
Present continuous tense
Simple present tense
Present perfect tense
Present perfect continuous tense
Correct Answer
Option 3
Solution
There are four types of tenses that together make up Present Tense, namely:
The Simple Present Tense is used:To express habits, universal truths, repeated actions or fixed events.For example :The school bus picks up the students at 6 am.
The Present Perfect Tense is used to indicate a link between the present and the past. It is used to describe:An action that started in the past and continues in the present. For example: He has worked in this company since 2004.
The Present Continuous Tense is made from the present form of the verb ‘be’ and the -ing form of a verb. It is used:To describe an action that is happening at the moment of speaking. For example:The children are playing in the field.
The Present Perfect Continuous Tense is used for an action that started in the past and has continued up to the present moment. It is used:To describe an action that started in the past and has continued up to the present. For example: She has been singing for over two hours.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Maya _______ at the children for making a mess. [MSQ]
Screamed
Screams
is screaming
has been screaming
Correct Answer
Option 1,3,4
Solution
Except option b) when we use the other options in the sentence, they are grammatically correct.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What the meaning of the word ' Inchoate'
having lot of hatred
Filled with awe
only partly in existence
desperately hoping for good
Correct Answer
Option 3
Solution
Inchoate means only partly in existence; imperfectly formed.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Read the passage and answer the question.
PASSAGE
In 1885, the U.S. government locked funds to build a base for a statue, but a newspaper campaign attracted as many as 160,000 people to contribute. That was the Statue of Liberty. But it's the British rock group Marillion that is often credited for using a loyal and engaged fan base to fund a $60,000 US tour and subsequent album through its website. Back in 1997, that was the world’s first online crowdfunding campaign.
Since the early 2000s, several online crowdfunding platforms have come up across the globe helping people to bring their unique ideas to life. Either in the form of launching a unique product that they have designed or a film that they need help to make or simply raising funds for an ailing family member - crowdfunding in making all of it possible. Such has been the growth of the segment that statistics predict the size of the global crowdfunding market to be $28.8 billion by 2025.
It was a tiring flight from New York to Singapore in economy class that prompted Zeff O’ Nell to design a seat that could allow economy class passengers to lie down. The Zephyr seat took about four months to be designed and another eight months to be engineered and constructed into a mock-up. The result was a lie-flat social distancing complaint seat for airlines that could retrofit existing commercial aircrafts.
Through crowdfunding the company wants to raise money to scale up the business. It has currently raised more than 101K through its online campaign. As they say it's time to reach for the stars.
Question:
What is the first phase of crowdfunding?
Pre-campaign
Campaign
Post-campaign
Mission trips
Correct Answer
Option 2
Solution
Crowdfunding is so effective because campaigns reach their goals by receiving many small donations from a large group of supporters, rather than soliciting gifts from a few major contributors.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
#include<stdio.h>
void main()
{
int i=257;
int *iptr=&i;
printf("%d %d", *((char*)iptr),*((char*)iptr+1));
}
What will be the output of the above program?
1 1
1 2
2 3
2 2
Correct Answer
Option 1
Solution
i = 257
integer 4 bytes = 32 bits
i = 257 = 00000000 00000000 00000001 00000001
now interger pointer iptr is typecasted to character, whose size is 1 byte (8 bits).
By default system follows little endian system and from the above 4 bytes iptr will point to rightmost byte => 00000001 => %d means 1.
When it will be incremented i.e. iptr+1 , it will point to 2nd byte from right side => 00000001 => %d means 1
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
In a BST, we can find the Kth smallest element to a given element in O(1) time. ___
True
False
Correct Answer
Option 2
Solution
Finding the Kth smallest element, the predecessor, may require traveling down the height of the tree, making the running time O(h).
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
In a BST, we can find the Kth smallest element to a given element in O(1) time. ___
False
True
Correct Answer
Option 1
Solution
Finding the Kth smallest element, the predecessor, may require traveling down the height of the tree, making the running time O(h).
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
In-order is same as :
Depth-first order
Topological order
Linear order
Breadth-first order
Correct Answer
Option 1
Solution
In-order is one type of DFS.
There are three types of depth-first traversal: pre-order, in-order, and post-order.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
What will be the output of the following program?
#include <stdio.h>
#define square(x) (x*x)
int main(void) {
int a;
int b=3;
a=square(b+2);
printf("%d",a);
return 0;
}
11
14
16
18
Correct Answer
Option 1
Solution
#include <stdio.h>
#define square(x) (x*x)
int main(void) {
int a;
int b=3;
a=square(b+2); // here it will compute (b+2*b+2)=3+2*3+2=3+6+2=11
printf("%d",a);
return 0;
}
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following AVL tree.
Which of the following order of elements are inserted into an empty AVL tree, so that it is possible to get the above AVL tree?
84, 61, 76, 15, 88, 73, 17, 80
88, 84, 80, 73, 76, 15, 61, 84
76, 15, 88, 73, 17, 80, 61, 84
None of these
Correct Answer
Option 3
Solution
The order: 76, 15, 88, 73, 17, 80, 61, 84 will result the given AVL
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
If a, b and c are integer variables with the values a=8, b=3 and c=-5. Then what is the
value of the arithmetic expression: 2 * b + 3 * (a-c)
45
-16
6
-1
Correct Answer
Option 1
Solution
The value of the arithmetic expression is 45 as 2*3+3*(8—5)=6+3*13=6+39=45
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Choose the correct statement about the following program:
(Consider int needs 32 bits)
#include<stdio.h>
void main()
{
unsigned int n;
int temp=0;
scanf("%u", &n);
for(;n;n>>=1)
{
if(n & 1)
temp++;
}
printf("%d", temp);
}
It sets all bits in the number n to 1
It counts the number of bits that are 0 in the number n.
It counts the number of bits that are 1 in the number n.
Runtime error
Correct Answer
Option 3
Solution
Assume the numbers are of 4 bits, though data type int is of 32 bit.
Lets say n=1011 (11 in decimal) 1=(0001) base 2
In first iteration n= 1011 which is not equal to 0
n&1 = 1 hence temp is incremented ; n =n>>1 ,i.e. n=0101
n&1 =1 hence temp is incremented ; n =n>>1 ,i.e. n=0010
n&1 =0 hence temp is not incremented ; n =n>>1 ,i.e. n=0001
n&1 =1 hence temp is incremented ; n =n>>1 ,i.e. n=0000
The value of n is 0 hence the for loop terminates and we can see that the value of temp is 3, which
is equal to the number of set bits in 1011.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Match List I with List II
Choose the correct answer from the options given below:
A-I, B-III, C-IV, D-II
A-III, B-I, C-IV, D-II
A-III, B-I, C-II, D-IV
A-I, B-III, C-II, D-IV
Correct Answer
Option 4
Solution
→ Topological sort of DAG takes O(V+E) time.
→ Bellman ford single source shortest path takes O(VE) time
The next edge can be obtained in O(logE) time if the graph has E edges.
Reconstruction of heap takes O(E) time.
So, Kruskal’s Algorithm takes O(ElogE) time.
The value of E can be at most O(V^2).
So, O(logV) and O(logE) are the same.
General Kruskal’s algorithm: Sorted edges will take O(ElogV) and unsorted edges will take O(ElogE)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
The running time of an algorithm is O(g(n)) if and only if
its worst-case running time is O(g(n)) and its best-case running time is (g(n))(O=big O)
its worst-case running time is (g(n)) and its best-case running time is O(g(n))(O=big O)
O(g(n))=(g(n))(O=big O)
O(g(n))ω(g(n))is non-empty set, (o=small o)
Choose the correct answer from the options given below:
(A) only
(B) only
(C) only
(D) only
Correct Answer
Option 4
Solution
BigOh(O) denotes upper bound or worst case
BigOmega() denotes lower bound or best case
BigTheta(𝛉) denotes Average bound or average case
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the undirected graph below: [MSQ]
Using Prim’s algorithm to construct a minimum spanning tree starting with node a, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?
The final sequence is a-b, b-c, c-i, c-f, f-g, g-h, c-d, d-e
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Which among the following statement(s) is (are) true?
A hash function takes a message of arbitrary length and generates a fixed length code.
A hash function takes a message of fixed length and generates a code of variables.
A hash function may give the same value for distinct messages.
Choose the correct answer from the options given below:
(A) only
(B) and (C) only
(A) and (C) only
(B) only
Correct Answer
Option 3
Solution
A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M).
In general terms, the principal object of a hash function is data integrity. A change to any bit or bits in M results, with high probability, in a change to the hash code.
Cryptographic hash function should have following two properties:
The one-way property: It should be computationally infeasible to find the data object that maps to a pre-specified hash result.
Collision-free property: No two data objects should map to the same hash result
Because of these characteristics, hash functions are often used to determine whether or not data has changed.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Both Statement I and Statement II are true
Both Statement I and Statement II are false
Statement I is correct but Statement II is false
Statement I is incorrect but Statement II is true
Correct Answer
Option 3
Solution
I. TRUE: Undirected graphs do not have cross edges in DFS. But can have cross edges in directed graphs.
II. FALSE: Just draw a triangle ABC. Source is A. Vertex B and C are at the same level at distance 1. There is an edge between B and C too. So here |i - j| = |1 - 1| = 0.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
P-2, Q-3, R-4, S-1
P-2, Q-4, R-3, S-1
P-4, Q-3, R-2, S-1
P-4, Q-2, R-3, S-1
Correct Answer
Option 3
Solution
P: Binary search tree → divide and conquer technique.
Q: 0/1 knapsack problem → Dynamic programming approach.
R: Huffman Coding → Greedy
S: Depth-first Search → Stack
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Select the correct option/options. [MSQ]
Every context free language has a regular superset.
Every context free language has a regular subset.
Every finite subset of a language is regular.
Every subset of regular language is regular.
Correct Answer
Option 1,2,3
Solution
(a) Every language has a regular subset: It is true as an empty language is a regular language and it is a subset of every language. Hence for CFL also.
(b) Every language has a regular superset. It is true as universal language (i.e, sigma * or (a+b)*) is a regular language and it is the superset of every language. Hence for CFL also.
(c) Every finite subset of any language is regular. It is true as any finite subset of any language must be finite hence regular.
(d) Every subset of regular language is regular. It is false as L1={an bn | n>0} is subset of L=a*b* and it (L1) is non-regular.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider the following languages.
L1={a^m b^n | m=n & m,n>0}
L2={a^m b^n | m≠n & m,n>=0}
Select the correct option.
Both L1 and L2 are DCFL but not regular.
L1 and L2 are complement to each other.
L1 is DCFL and L2 is CFL but not DCFL.
Both L1 and L2 are CFL but not DCFL.
Correct Answer
Option 1
Solution
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following PDA (q0 is initial state and qf is final state). Select the correct option with reference to PDA.
The language accepted by PDA is L={a^m b^n | m>n & m,n>0}
The language accepted by PDA is L={a^m b^n | m>n & m,n>=0}
The language accepted by PDA is L={a^m b^n | m<n & m,n>0}
The language accepted by PDA is L={a^m b^n | m<n & m,n>=0}
Correct Answer
Option 1
Solution
The PDA accepts {aab,aaab, aaabb, aaaab, aaaabb, aaaabbb, …………}
Hence, the language accepted by PDA is L={a^m b^n | m>n & m,n>0}
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the PDA M = {{q0, q1}, {0,1}, {0,1, z0}, {q0},{ z0}, {qF}}
δ = {
(q0, 0, z0) -> (q0, 0z0),
(q0, 0,0) -> (q0, 00)
(q0, 1,0) -> (q0, 10)
(q0, 1,1)-> (q0, 11)
(q0, 0,1) -> (q1, ∊)
(q1, 0,1) -> (q1, ∊)
(q1, 0,0) ->(q1, ∊)
(q1, ∊, z0) -> (qF, ∊)
}
The language corresponding to above PDA is
L = {0^n1^n0^n | n ≥ 1}
L = {0^n1^m0^(n+m) | n,m ≥ 1}
L = {0^n1^(n+m)0^m | m, n ≥ 1}
L = {0^n1^n0^m | m, n ≥ 1}
Correct Answer
Option 2
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following definitions.
prefix (L) = {u | ∃v : uv ε L}
suffix(L)= {v | ∃u uv ε L}
Let L1 and L2 are two languages such that
L1= (a+b)*b
L2=a(a+b)*b*
Select the correct option.
prefix(L1)= suffix(L2)
prefix(L1)=prefix(L2)
suffix(L1)=suffix(L2)
suffix(L1)=prefix(L2)
Correct Answer
Option 1
Solution
L1= (a+b)*b
L2=a(a+b)*b*
L2 is equivalent to =a(a+b)* [ as b* can be epsilon also as well as (a+b)* also generates strings of b* ]
So
L1= (a+b)*b
L2=a(a+b)*
So prefix(L1)= (a+b)* and suffix (L2)=(a+b)*
Hence prefix(L1)=suffix(L2)
prefix(L1)≠prefix(L2) as prefix L1 can contain string begin with “b” but prefix L2 will never contain string begin with “b”.
Similarly suffix(L1)≠suffix(L2) and suffix(L1)≠prefix(L2).
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Suppose a programming language does not allow integer division operation. This is generally detected in the phase of ____
Lexical analysis
Syntax analysis
Semantic analysis
Code optimization
Correct Answer
Option 3
Solution
Type casting is done in the semantic analysis phase.
For example
float x,y and int z
x=y/z ;
This statement is type casted as
x=y/ (float) z ;
So division by integer will also be detected in the semantic analysis phase.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Assumea compiler X for C language generates a code C for a computer Y. This code C can be run on __
It can be run only on computer Y.
It can be run on any computer.
It can be run only on the computers which have the processor and operating system similar to computer Y.
It can be run only on the computers which have the processor, operating system and peripherals similar to computer Y.
Correct Answer
Option 3
Solution
C compiler has two components viz. Front end and back end. Back end is specific for the processor and operating system on which code is meant to run. Hence the code C can be run only on the computers which have the processor and operating system similar to computer Y.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the grammar G whose productions are:
A-> abA | aAb | ϵ
Select the correct option. [MSQ]
The grammar is ambiguous.
The grammar generates all even length strings.
The string “ab” has one parse tree.
There is a string generated by the grammar which has exactly one parse tree.
Correct Answer
Option 1,4
Solution
The string “ab” has two parse trees using LMD.
A->aAb -> ab
A-> abA-> ab
The grammar is ambiguous, as string “ab” has two parse trees. The grammar does not generate string “ba” hence grammar generates all even length strings is false, please note all strings generated by the grammar are of even length (i.e., grammar never generates odd length strings ) but grammar does not generate all even length strings. The grammar generate “epsilon” and it has only one parse tree
(only parse tree for epsilon) A-> epsilon
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Consider the given below grammar.
S→ X&Z | Y*
X→ YZ
Y→ #Y | Z
Z→ &++S | ϵ
For which non terminal /non-terminals, the “&” is a part of corresponding FOLLOW set.
{Y}
{ Y, Z}
{S, Y, Z}
{S, X, Y, Z}
Correct Answer
Option 4
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The following code segment is executed on a processor which allows only register operands in its instructions. Each instruction can have at most two sources operands and one destination operand. Assume that all variables are dead after this code segment.
z=x+y;
p=z*x;
q=z+x;
a=z*z;
if(a>x) {
k=x*x;
}
else {
p=p*p;
q=q*q;
}
Suppose the instruction set architecture of the processor has only two registers. The only allowed compiler optimization is code motion, which moves statements from one place to another while preserving correctness. The minimum number of spills to memory in the compiled code will be ____________
1
Correct Answer
Option 1
Solution
The number of registers in a computer is limited (typically 8 to 16). Hence all
variables defined in a program cannot be accommodated in all registers simultaneously. If there are not enough registers to hold all the variables, some variables may be moved to and from RAM. This process is called "spilling" the registers. [Spilling is the action that consists of storing a variable into memory instead of registers].
Code motion means moving code from one location to other without having any effect on the output.
Assume we have two registers R1 and R2.
After applying code motion the statements p=z*x; and q=z+x; can be moved inside else block as “p” and “q” are not used anywhere before that and also the value of x and z are not changing anywhere. So the code after code motion optimization will be
z=x+y;
a=z*z;
if(a>x) {
k=x*x;
}
else {
p=z*x;
p=p*p;
q=z+x;
q=q*q;
}
z=x+y;
R1 ← x
R2 ←y
R2 ← R1 + R2
a=z*z;
1 spill to memory (writing the value of z into memory as R2 contains z and this z will be used in p=z*x and q=z+x)
R2← R2*R2
If (a>x)
CMP (R2, R1)
k=x*x;
R2← R1*R1
else {
p=z*x;
p=p*p;
q=z+x;
q=q*q;
}
R2 ← z [from memory]
R2 ← R2 * R1
R2 ← R2 * R2
R2← z [from memory]
R2 ← R2+R1
R2 ← R2 * R2
Hence total 1 spill to memory is required.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
Refer the diagram below, where the attributes of relation R are characterized.
Identify the correct statements?
A5 is a weak attribute
A3 is a multivalued attribute
A2 is a derived attribute
A3 is a foreign key attribute
Correct Answer
Option 2
Solution
Multi-valued attribute: double oval
Derived attribute: dashed oval
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Identify the CORRECT statement(s)?
Correct Answer
Option 1,2,4
Solution
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Consider the following statements based on the wait-die scheme for deadlock prevention:
1. Older transactions may wait for younger one to release data items. (older means smaller timestamp).
2. Older transactions force rollback of younger transactions instead of waiting for it. Younger transactions may wait for older ones.
3. A transaction may die several times before acquiring needed data items.
4. It is a non-preemptive scheme.
5. It is a preemptive scheme.
Identify the group of statements which are incorrect.
1, 3, 4
2, 5
1, 3, 5
2, 3, 4
Correct Answer
Option 2
Solution
Wait-Die Scheme: In this scheme, If a transaction requests for a resource that is locked by another transaction, then the DBMS simply checks the timestamp of both transactions and allows the older transaction to wait until the resource is available for execution.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Suppose timestamp ordering protocol is used to control concurrent access. In this context a transaction Ti issues a read(Q). Q is the data item. Identify the correct operations for implementing the read.
If Timestamp(Ti) ≤ Write-timestamp(Q), the read operation is executed
If Timestamp(Ti) ≤ Write-timestamp(Q), Read-timestamp(Q) is set to max(Read-timestamp(Q), Timestamp(Ti))
If Timestamp(Ti) ≤ Write-timestamp(Q), Read-timestamp(Q) is set to max(Read-timestamp(Q), Write-timestamp(Q))
If Timestamp(Ti) ≤ Write-timestamp(Q), the read operation is rejected, and Ti is rolled back
Correct Answer
Option 4
Solution
Suppose timestamp ordering protocol is used to control concurrent access. In this context a transaction Ti issues a read(Q) then, if Timestamp(Ti) ≤ Write-timestamp(Q), the read operation is rejected, and Ti is rolled back.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following page reference string: 7,2,3,1,2,5,3,4,6,7,7,1,0,5, 4,6,2,3,0,1. Assume demand paging with 3 frames, how many page faults would occur for the LRU page replacement algorithm?
14
18
17
13
Correct Answer
Option 2
Solution
A total of 18 page faults occurs for LRU page replacement algorithm.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a paging system that uses a 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. To make the memory access faster, a physical level-1 cache is introduced, with no write back mechanism. The cache access time is 75 ns and search time is negligible, with a cache hit rate of 90%. Assume that the TLB hit ratio is 95%, and the page tables are not cached, the average memory access time in ns (round off to 2 decimal places) is ________.
Consider a disk queue with requests on cylinders 98, 183, 41, 122, 14, 124, 65, 67. The head is initially at cylinder number 53 moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests using the SCAN scheduling algorithm is
330
329
331
328
Correct Answer
Option 3
Solution
Total head movements incurred while servicing these requests
Consider a virtual address with a page size of 1KB. Two-level paging is used with an equal number of entries in every page table. If the page table entry is 2 bytes long, what is the maximum size of the physical address space. ?
512MB
256MB
64MB
128MB
Correct Answer
Option 3
Solution
PTE = 2bytes = 16 bits = Frame numbers
Size of main memory = No.of frames * Frame size
= 2^16 * 1KB = 64MB.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
A process has 5 logical pages, and accesses them in this order: 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5. Which of the following statements is/are TRUE ? [MSQ]
The above referenced string suffers from Belady’s anomaly when used with FIFO page replacement algorithm.
The above referenced string generates 9 page faults with 3 frames, and 10 page faults with 4 frames, using the FIFO page replacement.
The above referenced string suffers from Belady’s anomaly when used with LRU page replacement algorithm.
In LRU, the N most recently used frames are always a subset of N+1 most recently used frames. So if a page fault occurs with N+1 frames, it must have occurred with N frames also.
Correct Answer
Option 1,2,4
Solution
For string above, 9 faults with 3 frames and 10 faults with 4 frames when used with FIFO page replacement algorithm. Thus, it exhibits Belady’s anomaly. In LRU, the N most recently used frames are always a subset of N+1 most recently used frames. So if a page fault occurs with N+1 frames, it must have occurred with N frames also. So page faults with N+1 frames can never be higher. Therefore, LRU does not suffer from Belady’s anomaly.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following statements with respect to the application layer:
S1: Datagram is the PDU (Protocol data unit) used.
S2: There is a fixed limit on the maximum size of data that it can pass on the TCP layer.
Which of the following options is correct?
Only S1 is true
Only S2 is true
Both S1 and S2 are true
Neither of S1 or S2 is true
Correct Answer
Option 4
Solution
. Message is the PDU used by the application layer.
• There is no limit on the maximum size of data that it can pass on the TCP layer. The application layer can generate any amount of data, its the responsibility of the TCP layer to break the message into a segment and transmit.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Which of the following protocol is used to monitor network devices such as hubs, switches and routers?
OSPF
RIP
SMTP
SNMP
Correct Answer
Option 4
Solution
SMTP stands for Simple Mail Transfer Protocol. SMTP is used when the email is delivered from an email client, such as Outlook Express, to an email server or when the email is delivered from one email server to another. SMTP uses port 25.
The Routing Information Protocol (RIP) is one of the oldest distance-vector routing protocols which employ the hop count as a routing metric. RIP prevents routing loops by implementing a limit on the number of hops allowed in a path from source to destination.
Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. It uses a link-state routing (LSR) algorithm Simple network management protocol is a protocol for network management purpose and is used for collecting information from and configuring, network devices such as servers, printers, hubs, switches and router on IP network.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following statements:
S1: Data link layer define the boundaries of the frame because framing is always of fixed size.
S2: Bit stuffing is the process of adding one extra 0 after 6th bit whenever five consecutive 1’s follow a 0 in the data if 0111110 is assumed as a flag.
Which of the following option is correct?
Only S1 is true
Only S2 is true
Both S1 and S2 are true
Neither of S1 or S2 is true
Correct Answer
Option 4
Solution
Variable- size framing is also used apart from fixed-size framing. Hence S1 is false.
If the flag is 0111110, then while bit stuffing ‘0’ will be stuffed after 5th but. So, S2 is false.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
An IP router with a Maximum Transfer Unit (MTU) of 1400 bytes excluding header length has received an IP datagram of size 4000 bytes excluding IP header length. The value of offset field in the header of the third IP fragment generated by the router for this packet are ________?
350
Correct Answer
Option 1
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
A Cycle graph with 101 vertices has chromatic number
2
3
4
5
Correct Answer
Option 2
Solution
For planar cycle graph with odd vertices, chromatic number is 3.
For the above graph, if A=1, B=2 then C,∊ can be 2,1. It returns a new colour for ‘D’, as this is odd cycle.
Note: It applies for any wheel graph with odd number of vertices, thus for n=101, chromatic number is 3.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
The set {1, 2, 3, …, n-1} is a Group under multiplication modulo n. Then the smallest value of n between 20 and 30 is (20, 30 included) _________?
23
Correct Answer
Option 1
Solution
We know that the set {1, 2, …, n-1} is a group under multiplication modulo n if any only if n is a prime number.
So, minimum possible value of n between 20 and 30 is 23.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
In a class of 40 students, 14 are studying Maths and 29 are studying Operating systems. If 5 students are practicing both then the number of students not studying any of Maths, Operating system are _____.
2
Correct Answer
Option 1
Solution
Given that
n(M)=14
n(O)=29
Total = 9 + 5 + 24 = 38
Out of 40, the 38 are studying either Maths or Operating systems.
Rest 40 - 38 = 2 are not studying Operating system, Maths.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
0
-1/16
Undefined
1/2
Correct Answer
Option 2
Solution
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Froma well shuffled deck of cards, a card is drawn and placed back after noting it for 104 times consecutively. In this poisson distribution what is the probability that atleast once we get a ace of spades. ( e^-2 = 0.136)
0. 786
0.524
0.864
0.345
Correct Answer
Option 3
Solution
For this poisson distribution
Probability to select an ace of spades is 1/52.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The eigen values of matrix are 5, -1. Choose the eigen value of matrix “-2A+3I” [MSQ]
7
-7
5
-5
Correct Answer
Option 2,3
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
The determinant of the matrix is
(a-c)(b-c)(b-a)
(a+b)(b+c)(c+a)
(a-b)(b-c)(c-a)
None
Correct Answer
Option 1
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
The inverse of the matrix is
Correct Answer
Option 4
Solution
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider a write through cache having 90% hit ratio for read operation and access time of 20ns. Main memory has an access time of 180ns. What is the average time for write operation (in ns)?
180
Correct Answer
Option 1
Solution
For the write operation it is given as write through policy. In write through updation both the main memory and the cache are updated simultaneously. And we consider the write operation is complete when data is written to both cache and main memory. Because of that we take the maximum of these two, which is main memory access time as the time for write operation. Hence Tavgwrite = 180ns.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Match the following with the addressing modes and the example instructions:
P-iii, Q-i, R-ii
P-iii, Q-ii, R-i
P-i, Q-ii, R-iii
P-i, Q-iii, R-ii
Correct Answer
Option 1
Solution
In implied addressing mode, the operand is implicitly part of the instruction. In the given instructions INCA which is to increment the accumulator there is no operand mentioned explicitly. Hence INCA is implied addressing mode.
Out of the given instructions MUL R1, @(R2) uses the indirect addressing mode, where for the second operand we need two memory accesses to get the actual value., R1 <- R1 * M[M[R2]]
From the given instructions SUB R1, +(R2) uses the auto-increment addressing mode where to get the second operand we need to auto-increment R2 and then access the actual value from the updated location.
R2 <-R2++
R1 <- R1 - M[R2]
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider the following statements regarding memory-mapped I/O and isolated I/O. [MSQ]
Choose the correct statement/s
Memory mapped I/O is faster than isolated I/O.
Memory mapped I/O is more complex than isolated I/O.
Memory mapped I/O consumes less power than isolated I/O.
In isolated I/O, all of the CPU's addressing modes are available for the I/O as well as the memory.
Correct Answer
Option 1,3
Solution
One merit of memory-mapped I/O is that, by discarding the extra complexity that isolated I/O brings, a CPU requires less internal logic and is thus cheaper, faster, easier to build, and consumes less power. Hence options A and C are true and B is false.
In memory mapped IO, because regular memory instructions are used to address devices, all of the CPU's addressing modes are available for the I/O as well as the memory. Hence option D is false.
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.00
A computer has a 256KB, 8-way set associative, write back data cache with block size of 64 Bytes. The processor sends 32 bit addresses to the cache controller. Each cache tag directory entry contains, in addition to address tag, 2 valid bits, 1 modified bit and 1 replacement bit.
The number of bits in the tag directory entry associated with each cache line is ?
17
21
18
20
Correct Answer
Option 2
Solution
It is given that cache size = 256 KB
Cache block size = 64 Bytes
So, the number of blocks in the cache = 256K / 64 = 4 K
It is an 8-way set associative cache. Each set has 8 blocks.
So, the number of sets in cache = 4 K / 8 = 512 = 2^9.
So, 9 bits are needed for accessing a set. Inside a set we need to identify the cache block.
Since cache block size is 64 bytes, block offset needs 6 bits.
Out of 32 bit address, no. of TAG bits = 32 - 9 - 6 = 32-15 = 17
There are 17 bits in the TAG field of the physical address. But in the TAG directory of the cache each entry has additionally 2 valid bits, 1 modified bit and 1 replacement bit also.
So, number of bits in the TAG directory entry = 17 + 2 + 1 + 1 = 21
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider a disk drive with the following specifications:
16 surfaces, 512 tracks/surface, 512 sectors/track, 512 B/sector, rotation speed 6000 rpm. The disk is operated in burst mode. Memory cycle time is 80 nsec. The maximum percentage of time that the CPU gets blocked during DMA operation to transfer 64KB from the disk if one word is 4 bytes long:
10.23
25.44
66.66
33.33
Correct Answer
Option 4
Solution
It is given the disk has 6000rpm.
6000 rotations in 60 seconds.
Time taken for 1 rotation = 60/6000 seconds = 1/100 seconds
Each track has 512 sectors and each sector is 512B in size. So each track size = 512 * 512B = 256KB.
In one rotation one track can be read. So in 1/100 seconds 256KB can be read.
It is given that one word is 4 bytes long. So time taken to read one word from the disk(4 bytes) = (4/256K) * (1/100) seconds ~= 160 ns
64KB is the same as 16K words as one word is 4 bytes. So time taken to prepare 16K words = 160ns*16K = 2560 microseconds.
Here 2560 microseconds is the data preparation time. And time taken by the DMA to transfer the 4 bytes data is one cycle = 80ns.
Number of cycles needed by the DMA to transfer the 64KB data or 16K words = 16K * 80ns = 1280 microseconds.
So, % time the cpu gets blocked during DMA operation in burst mode = 1280 / (1280+2560) = 1/3 = 33.33%
Difficulty Level: 1
Positive Marks: 2.00
Negative Marks: 0.66
Consider the following function
f(a,b,c)= Σ(0,1,2,6)
Which of the following is/are true about the function f? (MSQ)
f is a neutral function
f is self-dual
f is neutral function but not self-dual
f is neither function nor self-dual
Correct Answer
Option 1,3
Solution
f(a,b,c)= Σ(0,1,2,6)
f() is a neutral function because the number of minterms is equal to the number of maxterms.
The terms 1 and 6 are mutually exclusive terms. So, f() is not self dual.
Mutually exclusive pairs are (0,7), (1,6), (2,5) and (3,4)
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.00
Let A and B are two unsigned binary numbers. Then A-B results in ____
Overflow
Carry 1 if A>B
Carry 0 if A>B
Carry 1 if A<B
Correct Answer
Option 2
Solution
Given numbers are unsigned numbers.
So, carry will be 1 if A > B. Discard the carry.
Carry will be 0 if A < B.
Difficulty Level: 1
Positive Marks: 1.00
Negative Marks: 0.33
Consider a 4 variable function f(a,b,c,d)= π(1,6,11,12) + d(5,7,13,15),
The number of PRODUCT terms in the minimal SoP expression of the function f() is____