HCU PHD CS MAY 2015

Question 1
When the most significant byte of a word is at the smallest address, the architecture is called
A
Big Indian
B
Little Endian
C
Big Endian
D
Little Indian
       Digital-Logic-Design       Number-Systems
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
A
that data fields should be declared private
B
that a class can extend another class
C
that a class can contain another class
D
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
A
the bits b31. . .b4
B
the bits b2. . .b0
C
the bits b31.. .b29
D
the bits b28. . .b0
       Computer-Organization       Cache
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
Question 4
Which of the following is TRUE about Vectors interrupts?
A
the interrupt service routine is determined by the interrupt-generating device
B
the interrupt service routine polls the devices to find the device that generated the interrupt
C
the interrupt is generated not by one device but by several devices simultaneously
D
None of the above
Question 5
The maximum number of items in a B-tree of order m and height h is
A
mh -1
B
mh-1 + I
C
mh+1 - 1
D
mh +1
       Database-Management-System       B-and-B+-Trees
Question 5 Explanation: 
The maximum number of items in a B-Tree of order m and height h is :
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?
A
22
B
23
C
24
D
25
       Database-Management-System       B-and-B+-Trees
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.
A
32
B
33
C
34
D
24
       Database-Management-System       B-and-B+-Trees
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
A
B
E
C
B,C
D
D
E
None of the above
       Database-Management-System       Keys
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;
A
2
B
4
C
6
D
None of the above
       Database-Management-System       SQL
Question 9 Explanation: 


Question 10
A unit of storage that can store one or more records in a hash fiIe organization is denoted as
A
Buckets
B
Disk Pages
C
Blocks
D
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?
A
Transaction
B
Flashback
C
Rollback
D
Abort
       Database-Management-System       Transactions
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?
A
16K entries
B
256K entries
C
8K entries
D
64K entries
       Operating-Systems       Memory-Management
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.
Question 13
Zombie process is a process
A
that lives forever in all situations
B
has terminated and is waiting for its parent to check its status
C
whose parent has died
D
None of the above
       Operating-Systems       System-Calls
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
A
CSMA/CD is not efficient
B
CSMA/CD requires duplex operation
C
Wireless networks have a high BER
D
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:
A
201.40.67.31, 201.40.67.63
B
201.40.67.0, 201.40.67.255
C
201.40.67.0, 201.40.67.63
D
201.40.67.31, 201.40.67.255
E
None of the above
       Computer-Networks       IP-Address
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
A
520
B
1490
C
1500
D
2000
       Computer-Networks       IPv4-and-Fragmentation
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
A
within the same network
B
any host in the world
C
within the same network and the network reached through one router
D
no host at all
       Computer-Networks       IP-Datagram
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.
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
A
100B, 200B, 400B, 300B, 50B
B
100B, 400B, 200B, 50B, 300B
C
100B, 400B, 200B, 300B, 50B
D
100B, 200B, 400B, 50B, 300B
Question 19
One major difference between RIPv1 and RIPv2 are:
A
RIPv1 is an IGP whereas RIPv2 is an EGP
B
RIPv1 uses UDP whereas RIPv2 uses TCP
C
RIPv1 supports Classful networks only whereas RIPv2 supports CIDR
D
None of the above
       Computer-Networks       Routing
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.
Question 20
The Memory Buffer Register(MBR) is best understood by which of the following descriptions
A
is a hardware memory device which denotes the location of the current instruction being executed
B
is a group of electrical circuits (hardware) that performs the intent of instructions fetched from memory
C
contains the address of the memory location that is to be read from or stored into
D
contains a copy of designated memory location specified by the MAR after a "read" or the new contents of the memory prior to "write".
       Computer-Organization       Registers
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
A
Loader
B
Boot strap controller
C
Hypervisor
D
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?
A
Batch processing
B
Multi-user
C
Multitasking
D
None of the above
       Operating-Systems       Types-of-Operating-System
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?
A
Brian Kernighan
B
Dennis Ritchie
C
Steve Jobs
D
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?
A
UNIX
B
Dennis Ritchie
C
Assembly Language Programming
D
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?
A
His ability to dance
B
The success of UNIX
C
Industry-wide change from mainframes to minis
D
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?
A
Fields Medal
B
Nobel Prize
C
Computer Scientist of the Year
D
Thring Award
Question 27
It is not possible to construct a graph having
A
Even number of nodes with even degree
B
Even number of nodes with odd degree
C
Odd number of nodes with even degree
D
Odd number of nodes with odd degree
       Engineering-Mathematics       Graph-Theory
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
A
Only 1-1
B
Only Onto
C
both 1-1 and onto
D
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;

}
A
O(n)
B
O(1)
C
θ(Iogn)
D
θ(n)
       Algorithms       Time-Complexity
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.
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.
A
61
B
121
C
3601
D
72
       Algorithms       Time-Complexity
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
A
O(n),O(n)
B
O(n),O(n2)
C
O(n2),O(n)
D
O(1),O(n)
       Algorithms       Sorting
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
Question 32
A Regular Expression for the language L over the alphabet Σ={a,b)* consisting of strings with exactly 2b's is
A
a*ba*ba*
B
a*bba*
C
bba*
D
a*bb
       Theory-of-Computation       Regular-Expression
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.
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+
A
I only
B
I and II
C
II and III
D
II only
       Theory-of-Computation       Languages-and-Grammars
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.
Question 34

How many new processes will be created in case a process executes the following

code:

fork();

fork();

fork();
A
9
B
7
C
6
D
8
       Operating-Systems       System-Calls
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
Question 35
As n → ∞, the function 2 √(n) grows faster than
A
√(n) but slower than n
B
n but slower than n2
C
n2 but slower than √(2n)
D
√(2n), but slower than 2n
       Algorithms       Asymptotic-Complexity
Question 35 Explanation: 
Question 36
Which of the following holds under the assumption that P ≠ NP
A
P ∩ NP - Complete = ɸ
B
NP-Hard=NP - Complete
C
NP=NP - Complete U P
D
None of the above
       Algorithms       P-NP
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
A
e - v + 1 where e < v
B
e - v + 1 where e >= v
C
v - e + 1 where e < v
D
v - e + 1 where e >=v
       Engineering-Mathematics       Graph-Theory
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
A
Eulerian circuit need not exist
B
Eulerian circuit exist with weight greater than 1000
C
Eulerian circuit exist with weight less than 1000
D
Eulerian circuit exist with weight equal to 1000
       Engineering-Mathematics       Graph-Theory
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
a * b=a
B
aVb= a
C
a*(bVc) = (a*b)Vc
D
a*(bVc) ≤ (a*b) V (a*c)
Question 40
Convert FEDCBA into octal number
A
77556272
B
77565277
C
76556272
D
77565472
       Digital-Logic-Design       Number-Systems
Question 40 Explanation: 
Question 41
Thrashing can be reduced by
A
increasing the CPU power
B
increasing degree of multiprogramming
C
increasing memory
D
increasing the swap space
       Operating-Systems       Memory-Management
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
A
(∀m)(∃n)(n > m) ⇒ prime(n)
B
(∃n)(∀m)(n > m) ⇒ prime(n)
C
(∀m)(∃n)(n > m) ⋀ prime(n)
D
(∃n)(∀m)(n > m) ⋀ prime(n)
Question 43
A disadvantage of an inverted page table as compared to a normal page table is
A
It is very large in size
B
It cannot support large virtual memory
C
It is inefficient in translation of logical to physical address
D
None of the above
       Operating-Systems       Memory-Management
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
A and B are equivalent
B
B implies A
C
A implies B
D
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
A
3
B
0
C
5
D
4
       Engineering-Mathematics       Graph-Theory
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.
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
A
3/16
B
13/10
C
10/16
D
1
       Engineering-Mathematics       Probability-and-statistics
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.
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
A
9BF0
B
9ABD
C
9ABC
D
9BF1
       Computer-Organization       Addressing-Modes
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;

}.
A
Since the default case is given first,it will be executed before any case matching n
B
A break statement should be inserted after each case.Fall through is not desirable here
C
For some values of. n, the environment will almost certainly exhaust its stack space before the calculation completes
D
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;

}
A
0
B
1
C
2
D
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
A
(A1,A3,A5)
B
(A1,A2,A5)
C
(A2,A3,A4)
D
(A1,A4)
       Engineering-Mathematics       Set-Theory
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.
A
18
B
36
C
9
D
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?
A
{(1,2),(2,3),(3,4),(2,1),(3,2),(4,3)}
B
{(1,2),(2,3), (3,4), (1,3), (2,4)}
C
{(1,2),(2,3),(3,4), (1,3),(2,4),(1,4)}
D
{(1,2),(2,3),(3,4),(1,4)}
       Engineering-Mathematics       Set-Theory
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
A
Degree of each region is greater than 3
B
Degree of each region is equal to 3
C
Degree of each region is greater than 2
D
Degree of each region is equal to 2
Question 54
How many queues are needed to implement a priority queue
A
1
B
2
C
3
D
0
       Data-Structures       Queues-and-Stacks
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
A
Tree
B
Stack
C
Queue
D
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)

}
A
No compile time error, generates an array of structure of size 3
B
No compile time error, generates an array of structure of size 9
C
Runtime error, in accessing the members of p[0]
D
Compile time error, illegal assignment to members of structure
       Programming       C-Programming
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
A
O(n2)
B
O(nlogn)
C
O(n)
D
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)
A
6
B
27
C
48
D
50
E
None of the above
       Data-Structures       Heap-Tree
Question 58 Explanation: 






Question 59
Which is the suitable data structure that finds duplicates in a list of numbers whose range is small
A
Hash
B
Binary Search tree
C
Linear queue
D
Linked list
       Data-Structures       Hashing
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?
A
arguments to f and pf takes arrays starting at different addresses
B
arguments of f and Pf take array starting at the same address
C
both can have different ending addresses
D
arr size in both statements is different
       Programming       Arrays
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);
A
24 0
B
24 1
C
25 0
D
25 1
       OOPS       JAVA
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.
A
Satisfiability problem
B
Halting problem
C
Travelling Salespersons problem
D
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:
A
Prim’s algorithm
B
Dijkstra’s algorithm
C
Bellman-Ford algorithm
D
None of the above
       Algorithms       Shortest-Path
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:
A
Right-CHILD(i) is at 2i + L, if 2i + 1 ≤ n
B
Right-CHILD(i) is at 2i, if 2i ≤ n
C
Right-CHILD(i) is at 2i -1, if 2i -1 ≤ n
D
None of the above
       Data-Structures       Binary-Trees
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
A
ABC
B
BCB
C
BB
D
None of the above
       Algorithms       Dynamic-Programming
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
A
nlog2n
B
n3
C
O(nlog2n * n3)
D
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
A
240
B
60
C
120
D
None of the above
Question 68
The relationship between time slice of a round-robin scheduler and the context switch time is as follows
A
They are independent of each other
B
Time slice must be smaller than the context switch time
C
Time slice must be equal to the context switch time
D
Time slice must be much higher than the context switch time
       Operating-Systems       Process-scheduling-algorithm
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 :
A
8
B
10
C
9
D
7
       Operating-Systems       Page-Replacement-algorithm
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
Question 70
An operating system supports multi-threading system. In Many to Many model when a thread performs a blocking system call :
A
other threads are allowed to run
B
other threads are strictly prohibited from running
C
other threads only from other processes are allowed to run
D
None of the above
       Operating-Systems       Process-Threads
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 :
A
10000110000001110011111100011111
B
11000011000000111001111100011111
C
01111001111110001100000011100000
D
001111001111110001100000011100000
       Operating-Systems       File-system
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.
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:
A
unsafe state
B
e safe state
C
a protected state
D
a deadlock
Question 73
A disadvantage of an inverted page table as compared to a normal page table is
A
It is very large in size
B
It cannot support large virtual memory
C
It is inefficient in translation of logical to physical address
D
None of the above
       Operating-Systems       Memory-Management
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
A
9!
B
630
C
315
D
None of the above
       Engineering-Mathematics       Combinatorics
Question 74 Explanation: 
The answer is
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
A
15
B
24
C
25
D
Insufficient data
       Engineering-Mathematics       Graph-Theory
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
There are 75 questions to complete.