Q1. The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem
with n discs is
Answer : Option DExplaination / Solution:
Let the three pegs be A,B and C, the goal is to move n pegs from A to C using peg B
The following sequence of steps are executed recursively
1.move n−1 discs from A to B. This leaves disc n alone on peg A --- T(n-1)
2.move disc n from A to C---------1
3.move n−1 discs from B to C so they sit on disc n----- T(n-1)
So, T(n) = 2T(n-1) +1
Q3.Assume that source S and destination D are connected through two intermediate routers
labeled R. Determine how many times each packet has to visit the network layer and the data
link layer during a transmission from S to D.
Answer : Option CExplaination / Solution:
From above given diagram, its early visible that packet will visit network layer 4 times, once
at each node [S, R, R, D] and packet will visit Data Link layer 6 times. One time at S and one
time at D, then two times for each intermediate router R as data link layer is used for link to
link communication.
Once at packet reaches R and goes up from physical –DL-Network and second time when
packet coming out of router in order Network – DL- Physical
Q5. Let the page fault service time be 10ms in a computer with average memory
access time being 20ns. If one page fault is generated for every 106 memory
accesses, what is the effective access time for the memory?
Q7.Which of the following statements are TRUE about an SQL query?
P : An SQL query can contain a HAVING clause even if it does not have a GROUP BY clause
Q : An SQL query can contain a HAVING clause only if it has GROUP BY clause
R : All attributes used in the GROUP BY clause must appear in the SELECT clause
S : Not all attributes used in the GROUP BY clause need to appear in the SELECT clause
Answer : Option BExplaination / Solution:
If we use a HAVING clause without a GROUP BY clause, the HAVING condition applies to
all rows that satisfy the search condition. In other words, all rows that satisfy the search
condition make up a single group. So, option P is true and Q is false.
S is also true as an example consider the following table and query.
What will be the output of the following C program segment?
Char inChar = ‘A’ ;
switch (inChar ) {
case ‘A’ : printf (“Choice A\ n”);
case ‘B’ :
case ‘C’ : print f(“Choice B”);
case ‘D’ :
case ‘E’ :
default : printf (“No Choice”) ; }
Answer : Option CExplaination / Solution:
Since there is no ‘break’ statement , the program executes all the subsequent case statements
after printing “choice A”
Q10.A computer has a 256 KByte, 4-way set associative, write back data cache with block size of
32 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 field of an address is
Answer : Option CExplaination / Solution:
Total Question/Mark :
Scored Mark :
Mark for Correct Answer : 1
Mark for Wrong Answer : -0.5
Mark for Left Answer : 0