HCU PHD CS MAY 2015
Question 1 |
When the most significant byte of a word is at the smallest address, the architecture is called
Big Indian | |
Little Endian | |
Big Endian
| |
Little Indian
|
Question 1 Explanation:
If the hardware is built so that the highest ,most significant byte of a multi-byte scalar is stored first , at the lowest memory address then the hardware is said to be big endian
Question 2 |
Polymorphisms means
that data fields should be declared private | |
that a class can extend another class | |
that a class can contain another class | |
that a variable of supertype can refer to a subtype object |
Question 3 |
A computer system has a RAM of 4 GB and a cache of 512MB. Assuming that the least significant bit is b0 ,the cache location using direct mapping is given by
the bits b31. . .b4 | |
the bits b2. . .b0 | |
the bits b31.. .b29
| |
the bits b28. . .b0
|
Question 3 Explanation:
Since the size of cache is 512MB = 2^29 B
So to determine we need 29 bits from the left side of the address which is of 32 bits( Size of RAM is 4GB = 2^32 B ). So the cache location using direct mapping is given by the bits b28. . .b0
So to determine we need 29 bits from the left side of the address which is of 32 bits( Size of RAM is 4GB = 2^32 B ). So the cache location using direct mapping is given by the bits b28. . .b0
Question 4 |
Which of the following is TRUE about Vectors interrupts?
the interrupt service routine is determined by the interrupt-generating device | |
the interrupt service routine polls the devices to find the device that generated the interrupt | |
the interrupt is generated not by one device but by several devices simultaneously | |
None of the above |
Question 5 |
The maximum number of items in a B-tree of order m and height h is
mh -1 | |
mh-1 + I | |
mh+1 - 1 | |
mh +1 |
Question 5 Explanation:
The maximum number of items in a B-Tree of order m and height h is :
m^h+1 -1
m^h+1 -1
Question 6 |
Each B-tree node can have at-most p tree pointers, p-1 data pointers and p-1 search key field values. These must fit into a single disk block if each B-tree node is to correspond to a disk block. Suppose the search field is V =9 bytes long, the disk block size is B=512 bytes, record (data) pointer is Pr =7 bytes and a block pointer is P=6 bytes. What is the value of p?
22 | |
23 | |
24 | |
25 |
Question 6 Explanation:

Question 7 |
What is the order p of a B+-tree given that the search key field is V=9 bytes long, the block size is B= 512 bytes, record pointer is Pr=7 bytes and a block pointer is P=6 bytes.
32 | |
33 | |
34 | |
24 |
Question 7 Explanation:

Question 8 |
Consider a schema R(A, B, C, D, E) with functional dependencies A → B, B→ C, BC → A , A→D , E→A, D→E. Which of the following is not a key?
A | |
E | |
B,C | |
D | |
None of the above |
Question 8 Explanation:

Question 9 |
The tuples in relation R(A,B) are {(1,2),(1,3), (3,4)) and the tuples in relation S(B,C) are (2,5), (4,6), (7,8)}. The number of tuples in the result of the following SQL query are:
Select * from R Natural Outer Join S;
2 | |
4 | |
6 | |
None of the above
|
Question 9 Explanation:


Question 10 |
A unit of storage that can store one or more records in a hash fiIe organization is denoted as
Buckets | |
Disk Pages | |
Blocks | |
Nodes |
Question 10 Explanation:
A unit of storage that can store one or more records in a hash file organization is denoted as buckets. Because all systems in the cluster share a common file structure via NFS, but not all disks are mounted on all other systems.
Question 11 |
Which of the following will undo all statements upto commit?
Transaction | |
Flashback | |
Rollback | |
Abort |
Question 11 Explanation:
Rollback will undo all the statements upto commit.
Question 12 |
If a system has a 32-bit processor, what are the number of page table entries if the page size is 16KB?
16K entries | |
256K entries | |
8K entries | |
64K entries |
Question 12 Explanation:
Page size is 16KB = 2^14B. So offset bit is 14 bit .
Hence no. of page table entries are 2^(32-14) = 2^18 = 256K entries.
Hence no. of page table entries are 2^(32-14) = 2^18 = 256K entries.
Question 13 |
Zombie process is a process
that lives forever in all situations | |
has terminated and is waiting for its parent to check its status | |
whose parent has died | |
None of the above |
Question 13 Explanation:
A zombie process or defunct process is a process that has completed execution (via the exit system call) but still has an entry in the process table: it is a process in the "Terminated state".
Question 14 |
Wireless LANs do not use CSMA/CD because
CSMA/CD is not efficient
| |
CSMA/CD requires duplex operation | |
Wireless networks have a high BER | |
Wireless networks are not secure |
Question 15 |
If a host has an IP address 201.40.67.31/25, what are the network ID and broadcast address of the network to which this host belongs:
201.40.67.31, 201.40.67.63 | |
201.40.67.0, 201.40.67.255 | |
201.40.67.0, 201.40.67.63 | |
201.40.67.31, 201.40.67.255
| |
None of the above |
Question 15 Explanation:
Correct answer is 201.40.67.0, 201.40.67.127
Question 16 |
If the MF bit-0, Fragment Offset : 1480 and Total Length : 520 in an IP datagram, then the length of datagram is
520 | |
1490 | |
1500 | |
2000 |
Question 16 Explanation:
It is clearly given in the question that total length = 520.Hence length of datagram is 520
Question 17 |
When the TTL of a datagram sent from a host H1 is 1, the data can reach a host which is
within the same network | |
any host in the world
| |
within the same network and the network reached through one router | |
no host at all |
Question 17 Explanation:
Option A is false because if there is one or more router between the two hosts then TTl will become at the first router itself and it will discard it.
Option B is false.Reason is same as in option A
Option C is false
Option D seems to be more appropriate answer.
Option B is false.Reason is same as in option A
Option C is false
Option D seems to be more appropriate answer.
Question 18 |
Five segments of data of sizes 100B, 400B, 200B, 300B and 50B are sent using TCP and PSH bit is set on each of the segments. There are no retransmission timeouts. The acks received are 101, 101, 701, 701 and 1051. In which order are the segments received
100B, 200B, 400B, 300B, 50B | |
100B, 400B, 200B, 50B, 300B | |
100B, 400B, 200B, 300B, 50B | |
100B, 200B, 400B, 50B, 300B |
Question 19 |
One major difference between RIPv1 and RIPv2 are:
RIPv1 is an IGP whereas RIPv2 is an EGP | |
RIPv1 uses UDP whereas RIPv2 uses TCP | |
RIPv1 supports Classful networks only whereas RIPv2 supports CIDR | |
None of the above |
Question 19 Explanation:
One major difference between RIPv1 and RIPv2 is
RIPv1 is a classful routing protocol and it does not support VLSM (Variable Length Subnet Masking). RIPv2 is classless routing and it support VLSM (Variable Length Subnet Masking). RIPv2 has the option for network mask in the update to allow classless routing advertisements.
RIPv1 is a classful routing protocol and it does not support VLSM (Variable Length Subnet Masking). RIPv2 is classless routing and it support VLSM (Variable Length Subnet Masking). RIPv2 has the option for network mask in the update to allow classless routing advertisements.
Question 20 |
The Memory Buffer Register(MBR) is best understood by which of the following descriptions
is a hardware memory device which denotes the location of the current instruction being executed | |
is a group of electrical circuits (hardware) that performs the intent of instructions fetched from memory | |
contains the address of the memory location that is to be read from or stored into | |
contains a copy of designated memory location specified by the MAR after a "read" or the new contents of the memory prior to "write". |
Question 20 Explanation:
A memory buffer register (MBR) is the register in a computer's processor, or central processing unit, CPU, that stores the data being transferred to and from the immediate access store. It contains the copy of designated memory locations specified by the memory address register.
Question 21 |
A Program that allows multiple operating systems to share a single hardware processor, in current terminology is called as
Loader | |
Boot strap controller | |
Hypervisor | |
Cross compiler |
Question 21 Explanation:
The program which provide partitioning, isolation or abstraction is called virtualization hypervisor. Hypervisor is a hardware virtualization technique that allows multiple guest operating systems (OS) to run on a single host system at the same time. A hypervisor is sometimes also called a virtual machine manager(VMM).
Question 22 |
Which type of operating system would be needed to allow the students in a class to read a file that the teacher also had open?
Batch processing | |
Multi-user | |
Multitasking | |
None of the above |
Question 22 Explanation:
A multi-user operating system (OS) is a computer system that allows multiple users that are on different computers to access a single system's OS resources simultaneously.
Question 23 |
Read the passage below and then answer the questions (23 - 26).
I thank the ACM for this award. I can't help but feel that I am receiving this honor for timing and serendipity as much as technical merit. UNIX swept into popularity with an industry-wide change from central main frames to autonomous minis. There is an old adage, "Dance with the one that brought you," which means that I should talk about UNIX. I have not worked on mainstream UNIX in many years, yet I continue to get undeserved credit for the work of others. Therefore, I am not going to talk about UNIX, but I want to thank everyone who has contributed. That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty. In the ten years that we have worked together, I can recall only one case of miscoordination of work. On that occasion, I discovered that we both had written the same 20-line assembly language program. I compared the sources and was astounded to find that they matched character-for-character. The result of our work together has been far greater than the work that we each contributed.
Whom did the speaker of the above paragraph work with for 10 years?
Brian Kernighan | |
Dennis Ritchie | |
Steve Jobs | |
None of the above |
Question 24 |
Read the passage below and then answer the questions (23 - 26).
I thank the ACM for this award. I can't help but feel that I am receiving this honor for timing and serendipity as much as technical merit. UNIX swept into popularity with an industry-wide change from central main frames to autonomous minis. There is an old adage, "Dance with the one that brought you," which means that I should talk about UNIX. I have not worked on mainstream UNIX in many years, yet I continue to get undeserved credit for the work of others. Therefore, I am not going to talk about UNIX, but I want to thank everyone who has contributed. That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty. In the ten years that we have worked together, I can recall only one case of miscoordination of work. On that occasion, I discovered that we both had written the same 20-line assembly language program. I compared the sources and was astounded to find that they matched character-for-character. The result of our work together has been far greater than the work that we each contributed.
Who or what is the speaker NOT going to talk about?
UNIX | |
Dennis Ritchie | |
Assembly Language Programming | |
None of the above
|
Question 25 |
Read the passage below and then answer the questions (23 - 26).
I thank the ACM for this award. I can't help but feel that I am receiving this honor for timing and serendipity as much as technical merit. UNIX swept into popularity with an industry-wide change from central main frames to autonomous minis. There is an old adage, "Dance with the one that brought you," which means that I should talk about UNIX. I have not worked on mainstream UNIX in many years, yet I continue to get undeserved credit for the work of others. Therefore, I am not going to talk about UNIX, but I want to thank everyone who has contributed. That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty. In the ten years that we have worked together, I can recall only one case of miscoordination of work. On that occasion, I discovered that we both had written the same 20-line assembly language program. I compared the sources and was astounded to find that they matched character-for-character. The result of our work together has been far greater than the work that we each contributed.
What astounded the speaker?
His ability to dance | |
The success of UNIX | |
Industry-wide change from mainframes to minis | |
Writing the same 20-line program as Dennis Ritchie |
Question 26 |
Read the passage below and then answer the questions (23 - 26).
I thank the ACM for this award. I can't help but feel that I am receiving this honor for timing and serendipity as much as technical merit. UNIX swept into popularity with an industry-wide change from central main frames to autonomous minis. There is an old adage, "Dance with the one that brought you," which means that I should talk about UNIX. I have not worked on mainstream UNIX in many years, yet I continue to get undeserved credit for the work of others. Therefore, I am not going to talk about UNIX, but I want to thank everyone who has contributed. That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty. In the ten years that we have worked together, I can recall only one case of miscoordination of work. On that occasion, I discovered that we both had written the same 20-line assembly language program. I compared the sources and was astounded to find that they matched character-for-character. The result of our work together has been far greater than the work that we each contributed.
"I thank the ACM for this award." What award can it be?
Fields Medal | |
Nobel Prize | |
Computer Scientist of the Year | |
Thring Award |
Question 27 |
It is not possible to construct a graph having
Even number of nodes with even degree | |
Even number of nodes with odd degree | |
Odd number of nodes with even degree | |
Odd number of nodes with odd degree |
Question 27 Explanation:
A graph is possible if sum of degree of vertices is even. But if we add odd number of vertices each with odd degree then sum will be odd,hence for this graph is not possible.
Question 28 |
f: N x N → N is a function where f(m,n)=2m.3n. Then f is
Only 1-1 | |
Only Onto | |
both 1-1 and onto | |
neither 1-1 nor onto |
Question 29 |
The time complexity of the following code segment is NOT of the order
while (n≠1)
{
n=n/2;
}
O(n) | |
O(1) | |
θ(Iogn) | |
θ(n) |
Question 29 Explanation:
Each time the value of n is getting decreased by 2.So time complexity in average and worst case it is O(logn).
Average case :θ (Iogn)
Worst case :O(logn) or O(n) can also be written.
Average case :θ (Iogn)
Worst case :O(logn) or O(n) can also be written.
Question 30 |
Two algorithms A and B are being compared for their efficiency on an input of size n. The running time of A is n3 seconds and the running time of B is n2 hours. Find the smallest n for which B is faster than A.
61 | |
121 | |
3601 | |
72 |
Question 30 Explanation:

Question 31 |
Let (a1,a2,a3,......,an-1,an) be a list of numbers in ascending order except for an, where an < a1. Then the time taken by insertion sort and bubble sort algorithms respectively to sort the list are
O(n),O(n) | |
O(n),O(n2) | |
O(n2),O(n) | |
O(1),O(n) |
Question 31 Explanation:
For almost sorted sequence of elements insertion sort takes O(n) time.Since the given sequence is almost sorted so it will take O(n) time.
Bubble sort will take O(n^2) time
Bubble sort will take O(n^2) time
Question 32 |
A Regular Expression for the language L over the alphabet Σ={a,b)* consisting of strings with exactly 2b's is
a*ba*ba* | |
a*bba* | |
bba* | |
a*bb |
Question 32 Explanation:
Option B is false because string abab will not be generated by the given regular expression.
Option C is false because string abab will not be generated by the given regular expression.
Option D is false because string abab will not be generated by the given regular expression.
Option A can generate all the strings with exactly two b’s.
Option C is false because string abab will not be generated by the given regular expression.
Option D is false because string abab will not be generated by the given regular expression.
Option A can generate all the strings with exactly two b’s.
Question 33 |
Which of the following generates the same language as L, Where L={xn yn | n ≥1}
I: E→ xEy | xy
II: xy | (x+ xyy+)
III: x+ y+
I only | |
I and II | |
II and III | |
II only |
Question 33 Explanation:
The grammar in (I) generates the same language as L.
(II) is not the required grammar because the given grammar can also generate the string xxyyy which is not in the language.
(III) is not the required grammar because the given grammar can also generate the string xyy which is not in the language.
(II) is not the required grammar because the given grammar can also generate the string xxyyy which is not in the language.
(III) is not the required grammar because the given grammar can also generate the string xyy which is not in the language.
Question 34 |
How many new processes will be created in case a process executes the following
code:
fork();
fork();
fork();
9 | |
7 | |
6 | |
8 |
Question 34 Explanation:
The no. of new processes that will be created using n fork() when given directly is 2^n - 1.
Therefore the required answer is 2^3 - 1 = 7
Therefore the required answer is 2^3 - 1 = 7
Question 35 |
As n → ∞, the function 2 √(n) grows faster than
√(n) but slower than n | |
n but slower than n2
| |
n2 but slower than √(2n)
| |
√(2n), but slower than 2n |
Question 35 Explanation:

Question 36 |
Which of the following holds under the assumption that P ≠ NP
P ∩ NP - Complete = ɸ | |
NP-Hard=NP - Complete | |
NP=NP - Complete U P | |
None of the above |
Question 36 Explanation:
No NP-Complete problem can be solved in polynomial time. Because, if one NP-Complete problem can be solved in polynomial time, then all NP problems can solved in polynomial time. If that is the case, then NP and P set become same which contradicts the given condition.
Question 37 |
Let G be a connected graph with "v" nodes and "e" edges. The number of edges
to be dropped to form a tree are
e - v + 1 where e < v | |
e - v + 1 where e >= v
| |
v - e + 1 where e < v
| |
v - e + 1 where e >=v
|
Question 37 Explanation:
For a tree no. of edges should be v-1. So if e is the total no. of edges ,then no. of edes to be removed to make the graph a tree is e-(v-1) = e-v+1.Moreover according to the question the graph is connected and not the tree then definitely e>=v. Hence option B is the answer.
Question 38 |
Let G be an Eulerian weighted graph with sum of the weights of edges as 1000. What is the weight of Eulerian circuit of G
Eulerian circuit need not exist
| |
Eulerian circuit exist with weight greater than 1000 | |
Eulerian circuit exist with weight less than 1000 | |
Eulerian circuit exist with weight equal to 1000 |
Question 38 Explanation:
In eulerian circuit each edge of eulerian graph is used exactly once.So since the given graph is eulerian weighted graph ,so the cost or weight of each edges will be used exactly once,and sum of all edge weigts given as 1000.Hence the weight of eulerian circuit is 1000.
Question 39 |
Let L be a bounded, distributive, complemented Lattice and a,b,c be the elements of L, then which of the following is valid
a * b=a | |
aVb= a | |
a*(bVc) = (a*b)Vc | |
a*(bVc) ≤ (a*b) V (a*c) |
Question 40 |
Convert FEDCBA into octal number
77556272 | |
77565277 | |
76556272 | |
77565472 |
Question 40 Explanation:

Question 41 |
Thrashing can be reduced by
increasing the CPU power | |
increasing degree of multiprogramming | |
increasing memory | |
increasing the swap space |
Question 41 Explanation:
Thrashing occurs due to more page fault.And page fault occurs due to less main memory.Hence thrashing can be reduced by increasing the size of main memory
Question 42 |
Let m and n be the natural numbers and let prime(n) be true if n is a prime.
Which of the following expression says that there are an infinite number of primes
(∀m)(∃n)(n > m) ⇒ prime(n) | |
(∃n)(∀m)(n > m) ⇒ prime(n) | |
(∀m)(∃n)(n > m) ⋀ prime(n) | |
(∃n)(∀m)(n > m) ⋀ prime(n) |
Question 43 |
A disadvantage of an inverted page table as compared to a normal page table is
It is very large in size | |
It cannot support large virtual memory | |
It is inefficient in translation of logical to physical address | |
None of the above |
Question 43 Explanation:
A disadvantage of an inverted page table as compared to a normal page table is that it is inefficient in translation of logical to physical address because look-up time in an inverted page table may be significantly higher when compared to a simple page table.
Question 44 |
Consider the following two Statements:
(A) There are infinitely many interesting whole numbers
(B) There are finitely many uninteresting whole numbers
Which of the following is Tnun
A and B are equivalent | |
B implies A | |
A implies B | |
None of the above |
Question 45 |
A simple graph on 8 vertices is given such that there is a vertex of degree 1, a vertex of degree 2, a vertex of degree 3, a vertex of degree 4, a vertex of degree 5, a vertex of degree 6 and a vertex of degree 7. Which of the following can be degree of the last vertex
3 | |
0 | |
5 | |
4 |
Question 45 Explanation:
We know that that for a graph to be valid sum of degree of vertices should be even. Now degree of seven vertices are given whose sum is 1+2+3+4+5+6+7 = 28.So the other vertex will be of even degree .Now option A and C are rejected. Now the answer is out of B and D.Now we will use havel hakemi theorem to check that the graph with given sequence including the last vertex is possible or not.
Lets check taking option B,
The degree sequence is 7,6,5,4,3,2,1,0. By using havel hakemi theorem this sequence is not possible.Hence option B is not correct.
Lets check taking option D,
The degree sequence is 7,6,5,4,4,3,2,1. By using havel hakemi theorem this sequence is possible.Hence the correct answer is option D.
Lets check taking option B,
The degree sequence is 7,6,5,4,3,2,1,0. By using havel hakemi theorem this sequence is not possible.Hence option B is not correct.
Lets check taking option D,
The degree sequence is 7,6,5,4,4,3,2,1. By using havel hakemi theorem this sequence is possible.Hence the correct answer is option D.
Question 46 |
Consider the set of all 2x2 matrices whose entries are either 0 or 1. A matrix is randomly chosen from that set. What is the probability that the determinant of the chosen matrix is -ve
3/16 | |
13/10 | |
10/16 | |
1 |
Question 46 Explanation:
In 2×2 matrices there are a total 4 elements and each element can either be 0 or 1. Hence total no. of matrices possible is = 2×2×2×2 = 16
Now the matrix whose determinant is -ve is,

Hence the required probability is 3/16.
Now the matrix whose determinant is -ve is,

Hence the required probability is 3/16.
Question 47 |
The Program counter contains the number 9ABC and the address part of instruction contains 134. If relative mode if addressing is used, find the effective address
9BF0 | |
9ABD | |
9ABC | |
9BF1 |
Question 47 Explanation:

Therefore the answer is 9BF0
Question 48 |
The function below has a flaw. Which one of the following describes the deficiency?
int fibonacci(int n)
{
if (n>0)
{
switch(n)
{
default: return (fibonacci(n-1) + fibonacci(n-2) ;
case 1:
case 2: return 1;
}
}
return -1;
}.
Since the default case is given first,it will be executed before any case matching n | |
A break statement should be inserted after each case.Fall through is not desirable here | |
For some values of. n, the environment will almost certainly exhaust its stack space before the calculation completes | |
An error in the algorithm causes unbounded recursion for all values of n |
Question 49 |
What is the output of the following code?
public class Test1{
public static void main(String[] args){
ChildClass c = new ChildClass();
c .print() ;
}
}
class ParentClass{
int id=1;
void print() {
System.out.println(id);
}
}
class ChiLdClass extends parentClass{
int id=2;
}
0 | |
1 | |
2 | |
Nothing appears in output |
Question 50 |
Let A : {1,2,3,4,5,6,7,8,9,10} A1={1,2,3,4}, A2: A2={5 ,6,7}, A3={4,5,7,9}, A4={4,8,10}, A5={8,9,10}, A6={1,2,9,6,8,10}. which of the following are partitions of A
(A1,A3,A5) | |
(A1,A2,A5) | |
(A2,A3,A4) | |
(A1,A4) |
Question 50 Explanation:
A1,A2 and A5 are the partitions of A because A1 U A2 U A5 = A.
Question 51 |
The main memory can store 32K words of 12 bits each. If direct cache mapping is used with a cache capability of 512 words, what is the size of each cache location.
18 | |
36 | |
9 | |
27 |
Question 52 |
Let R={(1,2),(2,3),(3,4)} be a relation on {1,2,3,4}. which one of the following is transitive closure of R?
{(1,2),(2,3),(3,4),(2,1),(3,2),(4,3)} | |
{(1,2),(2,3), (3,4), (1,3), (2,4)} | |
{(1,2),(2,3),(3,4), (1,3),(2,4),(1,4)} | |
{(1,2),(2,3),(3,4),(1,4)} |
Question 52 Explanation:

Hence, the transitive closure of R is,
{(1,2) (1,3) (1,4) (2,3) (2,4) (3,4)}
Question 53 |
If G is a polyhedral graph with 12 vertices and 30 edges then
Degree of each region is greater than 3 | |
Degree of each region is equal to 3 | |
Degree of each region is greater than 2 | |
Degree of each region is equal to 2 |
Question 54 |
How many queues are needed to implement a priority queue
1 | |
2 | |
3 | |
0 |
Question 54 Explanation:
2 queues. one is used for storing data... another is used for priorities. Priority queues are applied using 2-D array where it has two rows one for element and second for priority ,so minimum numbers of queues are needed to implement are two.
Question 55 |
What is the most suitable data structure to store permutation of a given set of alphabets in terms of search complexity
Tree | |
Stack | |
Queue | |
Adjacency list |
Question 56 |
Comment on the output of the given C code
#include
struct temp
{
int a;
int b;
int c;
};
main ( )
{
struct temp p[ ]={1, 2, 3, 4, 5, 6, 7, 8, 9};
printf(“%d”, p[0].a)
}
No compile time error, generates an array of structure of size 3 | |
No compile time error, generates an array of structure of size 9 | |
Runtime error, in accessing the members of p[0] | |
Compile time error, illegal assignment to members of structure |
Question 56 Explanation:
The given program generates an array of structure of size 3. So the array p[0]={1,2,3}, p[1]={4,5,6}, p[2]={7,8,9}.
Question 57 |
What is the search complexity of. finding nearest neighbors in a huge data set of size n
O(n2) | |
O(nlogn) | |
O(n) | |
O(1) |
Question 58 |
A min-max heap is defined as follows: Each node at an even level in the tree is less than all of its descendants, while each node at an odd Level in the tree is greater than all of its descendents
If the values are inserted in the order (3,6,9,19,27,48,50,66) in the min-max heap, what value would be found at position 5 in min-max heap (root is counted as position 1)
6 | |
27 | |
48 | |
50 | |
None of the above |
Question 58 Explanation:






Question 59 |
Which is the suitable data structure that finds duplicates in a list of numbers whose range is small
Hash | |
Binary Search tree | |
Linear queue | |
Linked list |
Question 59 Explanation:
The best data structure would be Hash.
Question 60 |
If two function declarations were made as follows:
f(int arr[])
pf(int *arr)
Which of the following statement is True?
arguments to f and pf takes arrays starting at different addresses | |
arguments of f and Pf take array starting at the same address | |
both can have different ending addresses | |
arr size in both statements is different |
Question 60 Explanation:
Arguments of f and pf take arrays starting at same addresses.
Question 61 |
What is the output of the following Java code
int count=1;
int num=25;
while (count<25)
{
num= num- 1 ;
count++ ;
}
System. out.println(count +” “+num);
24 0 | |
24 1 | |
25 0 | |
25 1 |
Question 61 Explanation:
The final output will be
Count = 25,num = 1.
Question 62 |
An example of NP-Hard decision problem which is not NP-Complete.
Satisfiability problem | |
Halting problem | |
Travelling Salespersons problem | |
None of the above |
Question 63 |
Which algorithm can be used for the solution of Single Source Shortest Path problem when the edges are of negative lengths:
Prim’s algorithm | |
Dijkstra’s algorithm | |
Bellman-Ford algorithm | |
None of the above |
Question 63 Explanation:
Dijktra’s and bellmanford algorithms, both are single sort shotest path.But for negative weight edges Dijkstras algorithm might give wrong answer.But bellman ford works fine.Hence Option C is the answer.
Question 64 |
If a complete binary tree with n nodes is represented sequentially using array then for any node with index i, 1 ≤ i ≤ n we have:
Right-CHILD(i) is at 2i + L, if 2i + 1 ≤ n | |
Right-CHILD(i) is at 2i, if 2i ≤ n | |
Right-CHILD(i) is at 2i -1, if 2i -1 ≤ n | |
None of the above |
Question 64 Explanation:
Option B is the correct answer.Take some complete binary tree and check it.
Question 65 |
If X=ABCB, Y=BDCAB, the Longest Common Subsequence (LCS) of X and Y is
ABC | |
BCB | |
BB | |
None of the above |
Question 65 Explanation:

Question 66 |
Consider the following C++ program (Assume no syntax errors)
#include
#include
#include
using namesPace std;
int main()
{
cout << Enter the number n: ;
int n;
cin >> n;
int sum = 0;
for (int i=1; i<=n ; i++)
for (int j=1; j<=i ; j++)
for (int k=1; k<=j ; k++)
{
cout<<” \n UOH”;
}
}
Asymptotic running time of the segment is
nlog2n | |
n3 | |
O(nlog2n * n3) | |
None of the above |
Question 67 |
How many times "UoH" will be printed for the value of n:8 for the c++ code of question number 66
240 | |
60 | |
120 | |
None of the above |
Question 68 |
The relationship between time slice of a round-robin scheduler and the context switch time is as follows
They are independent of each other | |
Time slice must be smaller than the context switch time | |
Time slice must be equal to the context switch time | |
Time slice must be much higher than the context switch time |
Question 68 Explanation:
Time slice of a round robin scheduler and the context switch time are independent of each other
Question 69 |
In an operating system, a process refers to 5 pages, A, B, C, D, E in the order :
A, B, C, D, A, B, E, A, B, C, D, E. If the page replacement algorithm is FIFO, the
number of page transfers with an empty internal store of 3 frames is :
8 | |
10 | |
9 | |
7 |
Question 69 Explanation:
We have to use FIFO page replacement policy for the given sequence,
A, B, C, D, A, B, E, A, B, C, D, E

A, B, C, D, A, B, E, A, B, C, D, E

Question 70 |
An operating system supports multi-threading system. In Many to Many model when a thread performs a blocking system call :
other threads are allowed to run | |
other threads are strictly prohibited from running | |
other threads only from other processes are allowed to run | |
None of the above |
Question 70 Explanation:
In many to many model the threads are connected to many kernel.So if one kernel blocks the thread then other threads are allowed to run by other kernel
Question 71 |
Consider a disk where blocks 2,3,4,5,8,9,10,11,12,13,17,18,25,26 and 27 are free and the rest of the blocks are allocated. If the block numbering starts from 0, then the free space bitmap would be :
10000110000001110011111100011111 | |
11000011000000111001111100011111 | |
01111001111110001100000011100000 | |
001111001111110001100000011100000 |
Question 71 Explanation:
In free space bit map ,1 indicates free blocks and 0 indicates occupied blocks.
The free blocks are 2,3,4,5,8,9,10,11,12,13,17,18,25,26 and 27 and the occupied blocks are
0,1,6,7,14,15,16,19,20,21,22,23,24.
So the bit map will look like 0011110011111100011000000111
Hence correct option is D.
The free blocks are 2,3,4,5,8,9,10,11,12,13,17,18,25,26 and 27 and the occupied blocks are
0,1,6,7,14,15,16,19,20,21,22,23,24.
So the bit map will look like 0011110011111100011000000111
Hence correct option is D.
Question 72 |
A system with 5 processes P0 through P4 and three resource types A, B, C has A with 10 instances, B with 5 instances, and C with 7 instances. At time t0, the following snapshot of a
Process(P0, P1, P2, P3, P4)
Allocation (process-wise: P0 through P4 top to bottom)
A B C
0 1 0
2 0 0
3 0 2
2 1 1
0 0 2
Max (process-wise: P0 through P4 top to bottom)
A B C
7 5 3
3 2 2
9 0 2
2 2 2
4 3 3
Available
A B C
3 3 2
The sequence leads the system to:
unsafe state | |
e safe state
| |
a protected state | |
a deadlock |
Question 73 |
A disadvantage of an inverted page table as compared to a normal page table is
It is very large in size | |
It cannot support large virtual memory | |
It is inefficient in translation of logical to physical address | |
None of the above |
Question 73 Explanation:
A disadvantage of an inverted page table as compared to a normal page table is that it is inefficient in translation of logical to physical address because look-up time in an inverted page table may be significantly higher when compared to a simple page table.
Question 74 |
In how many ways can nine students be partitioned into three teams containing four,
three and two students respectively
9! | |
630 | |
315 | |
None of the above |
Question 74 Explanation:
The answer is
C(9,4)*C(5,3)*C(2,2) = 1260
C(9,4)*C(5,3)*C(2,2) = 1260
Question 75 |
A connected planar graph with 15 vertices divides the plane into 12 regions. How many edges does the graph have
15 | |
24 | |
25 | |
Insufficient data |
Question 75 Explanation:
For a planar connected graph the formula is n-e+f = 2,
Where,
n=no. of vertices=15
e=no. of edges
f=no. of regions=12
Hence no. of edges is ,
n-e+f = 2
=>15-e+12=2
=>27-e=2
=>e=25
Where,
n=no. of vertices=15
e=no. of edges
f=no. of regions=12
Hence no. of edges is ,
n-e+f = 2
=>15-e+12=2
=>27-e=2
=>e=25
There are 75 questions to complete.