HCU PHD CS MAY 2016
Question 1 |

![]() | |
![]() | |
![]() | |
![]() |
Question 2 |
Which of the following protocols has all of the properties:
(i) imposing restrictions on the order of items being accessed
(ii) ensuring serializability without the requirement of two phase locking, and
(iii) additionally ensuring deadlock freedom.
Three phase locking | |
Timestamp ordering | |
Graph based locking | |
Strict two phase locking |
Question 2 Explanation:
Graph based protocol ensures serializability and deadlock freedom and has restrictions on items being accessed,because before acquiring access to elements we have to acquire lock on parents.
Question 3 |
The property which ensures "once a transaction completes successfully, the changes
it has made to databases persist, even if there are subsequent failures" is called
Atomicity | |
Consistency | |
Isolation | |
Durability |
Question 3 Explanation:
ACID properties in DBMS
Atomicity-This property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none.
Consistency-The database must remain in a consistent state after any transaction. No transaction should have any adverse effect on the data residing in the database. If the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well.
Isolation- In a database system where more than one transaction are being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.
Durability-The database should be durable enough to hold all its latest updates even if the system fails or restarts. If a transaction updates a chunk of data in a database and commits, then the database will hold the modified data. If a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action.
Atomicity-This property states that a transaction must be treated as an atomic unit, that is, either all of its operations are executed or none.
Consistency-The database must remain in a consistent state after any transaction. No transaction should have any adverse effect on the data residing in the database. If the database was in a consistent state before the execution of a transaction, it must remain consistent after the execution of the transaction as well.
Isolation- In a database system where more than one transaction are being executed simultaneously and in parallel, the property of isolation states that all the transactions will be carried out and executed as if it is the only transaction in the system. No transaction will affect the existence of any other transaction.
Durability-The database should be durable enough to hold all its latest updates even if the system fails or restarts. If a transaction updates a chunk of data in a database and commits, then the database will hold the modified data. If a transaction commits but the system fails before the data could be written on to the disk, then that data will be updated once the system springs back into action.
Question 4 |
Which of the following is an index mechanism, where an index record appears for
only some of the search key values?
Dense index | |
Sparse index | |
Multi-level index | |
None of these |
Question 4 Explanation:
In Dense Index, an index entry appears for every search-key whereas for Sparse index, an index entry appears for only some of the search-key values.
Question 5 |
In the context of databases SET concept is used in
Relational Model | |
Network Model | |
Hierarchical Model | |
Physical Model |
Question 5 Explanation:
There are two fundamental concepts of a network model :
->Records contain fields which need hierarchical organization.
->Sets are used to define one-to-many relationships between records that contain one owner, many members.
->Records contain fields which need hierarchical organization.
->Sets are used to define one-to-many relationships between records that contain one owner, many members.
Question 6 |
Databases that store information about the state of real world along with timeline are
Temporal databases | |
Mobile databases | |
Multimedia databases | |
Spatial databases |
Question 6 Explanation:
A temporal database stores data relating to time instances. It offers temporal data types and stores information relating to past, present and future time. Temporal databases could be uni-temporal, bi-temporal or tri-temporal. Valid time is the time period during which a fact is true in the real world.
Question 7 |
The condition- “there are no non-trivial functional dependencies of attributes on
anything other than a superset of a candidate key", is both necessary and sufficient
for a database to be in
2nd Normal form | |
3rd Normal form | |
PJNF | |
BCNF |
Question 7 Explanation:
The condition for the relation to be in BCNF is that the left side of functional dependencies must be super key.
Question 8 |
A sequence of length 10 bits is randomly generated. The probability that at least one of these bits is zero is equal to
1023/1024 | |
½ | |
1 | |
9/1024 |
Question 8 Explanation:
Total no. of possible sequences possible
= Each bit can be either 0 ‘or’ 1
= 2 × 2 × 2 … 10times
= 210
= 1024
Now let’s find the probability that none of the bits is 0 = 1/1024
Because out of 1024 only one sequence will contain all bits 1.
So the required probability
= 1 - 1/1024
= 1023/1024
= Each bit can be either 0 ‘or’ 1
= 2 × 2 × 2 … 10times
= 210
= 1024
Now let’s find the probability that none of the bits is 0 = 1/1024
Because out of 1024 only one sequence will contain all bits 1.
So the required probability
= 1 - 1/1024
= 1023/1024
Question 9 |
In a University, 1232 students have taken a course in Spanish, 879 have taken a course in French and 114 have taken a course in Russian. Further, 103 have taken course in both Spanish and Flench, 23 have taken in course both Spanish and Russian, and 14 have taken course in both Flench and Russian, If 2092 students have taken at ]east one of Spanish, French and Russian, how many students have taken a course in all three languages
7 | |
14 | |
23 | |
103 |
Question 9 Explanation:
Let
A = No. of students taken course in French
B = No. of students taken course in Russian
C = No. of students taken course in Spanish
Now, We have to find,
A∩B∩C
Now, the formula we know is
AUBUC = A + B + C - A∩B - B∩C - C∩A + A∩B∩C
= 1232 + 879 + 114 - 103 - 23 - 14 + A∩B∩C
2092 = 2085 + A∩B∩C
A∩B∩C = 7
A = No. of students taken course in French
B = No. of students taken course in Russian
C = No. of students taken course in Spanish
Now, We have to find,
A∩B∩C
Now, the formula we know is
AUBUC = A + B + C - A∩B - B∩C - C∩A + A∩B∩C
= 1232 + 879 + 114 - 103 - 23 - 14 + A∩B∩C
2092 = 2085 + A∩B∩C
A∩B∩C = 7
Question 10 |
The number of different reflexive relations on a set with n elements is
2n(n-1)
| |
2n2 | |
n2 | |
2n
|
Question 10 Explanation:
No. of total elements in n×n relation = n2
For reflexive relation all the diagonal elements must be there. In total there are n diagonal elements out of n2 and for remaining n2-n elements we have two choices either we can select it or don’t take it. Therefore total no. of reflexive relations possible is,
2 × 2 × 2 × …(n2-n)times
= 2n2-n
For reflexive relation all the diagonal elements must be there. In total there are n diagonal elements out of n2 and for remaining n2-n elements we have two choices either we can select it or don’t take it. Therefore total no. of reflexive relations possible is,
2 × 2 × 2 × …(n2-n)times
= 2n2-n
Question 11 |
p → q is logically equivalent to
~p V Q | |
p V ~q | |
p V q | |
~p V ~q |
Question 11 Explanation:
p → q is logically equivalent to ~p V Q
Question 12 |
What is the output of the following program ?
#include
void main()
{
char ch=1026;
switch(ch) {
Case 1: printf ("Response 1") ; break;
Case 2: printf ("Response 2"); break;
Case 3: printf ("Response 3") ; break;
default: printf ("Default Response" ) ;
}
}
Response 1
| |
Response 2 | |
Response 3 | |
Default Response |
Question 12 Explanation:
The binary value of 1026 is
10000000010
But since char is of 1 byte so, it will consider 8 bits from the right side. Hence the value of char will be
00000010 = 2
So when the switch is executed it will go to case 8 and “Response 2” will get printed.
10000000010
But since char is of 1 byte so, it will consider 8 bits from the right side. Hence the value of char will be
00000010 = 2
So when the switch is executed it will go to case 8 and “Response 2” will get printed.
Question 13 |
What is the output of the following program ?
#include
int main()
{
if(printf ("ABC")) printf ("True") ;
else printf("False");
return 0;
}
Compilation error | |
ABC | |
ABCTrue | |
ABCFalse |
Question 13 Explanation:
Inside the condition of if printf(“ABC”) will return 3 and we know that in if condition anything other than 0 is considered true so it will enter the if loop and will print Tue.Also before that ABC will get printed due to printf(“ABC”). So in total ABCTrue will get printed
Question 14 |
Which of the following declarations are legal ?
I. int a=0, b=1 , c=2; int array[3]={a,b,c};
II. int size = 3; int array[size];
III. int size = 3; int array[size]= {1,2,3};
IV. AII of the above
II and III
| |
I only | |
IV | |
I and II |
Question 14 Explanation:
III is not legal because variable sized object cannot be initialized.
Question 15 |
In the following program which segment is the variable 'p' to be stored
#include
int main()
{
char ch = 'a'; p = & a;
printf ("%c", *p) ;
return 0;
)
Context segment | |
Data segment | |
Stack segment | |
BSS segment |
Question 15 Explanation:
Since p is a local variable for main() function ,so it will be stored in stack section.
Question 16 |
Which of the following is a bottom-up approach to design a database by examining relationships among attributes ?
Functional dependency | |
Database modelling | |
Normalization | |
Decomposition |
Question 16 Explanation:
A well- known approach to database design that can be used as a bottom-up approach is normalization
Question 17 |
Empdt1(emp code,name,street,city,state,pincode)is a schema. For any pincode, there
is only one city and state. AIso for a given street, city and state, there is just one
pincode. In normalization terms, empdtl is a relation in
1NF oniy | |
2NF and hence in lNF | |
3NF and hence also in 2NF and 1NF | |
BCNF and hence also in 3NF and 2NF and 1NF |
Question 17 Explanation:
Given,
Pincode → city, state
Street, city, state → pincode
The candidate keys are
(empcode, name, pincode)
and
(empcode, name, street, city, state)
Since in both the functional dependencies right side is prime attributes but left side is not super keys. So the given relation is in 3NF but not in BCNF.
Pincode → city, state
Street, city, state → pincode
The candidate keys are
(empcode, name, pincode)
and
(empcode, name, street, city, state)
Since in both the functional dependencies right side is prime attributes but left side is not super keys. So the given relation is in 3NF but not in BCNF.
Question 18 |
Which of the following is not associated with transaction processing
Confirming an action or triggering a response | |
Producing detail summary or exception report | |
Recording a business activity | |
Maintaining a data |
Question 19 |
The statement, INSERT INTO INSTRUCTOR VALUES (10211, 'Smith','Biology',66000)
is of type ?
Query | |
DML | |
Relational | |
DDL |
Question 19 Explanation:
DML or Data Manipulation Language commands contains
->Select
->Update
->Delete
->insert
->Select
->Update
->Delete
->insert
Question 20 |
The data models defined by a ANSI-SPARC database architecture are
Conceptual, physical and internal | |
Conceptual, view and external | |
Logical, physical and internal | |
Logical, physical, view
|
Question 21 |
Let Knbe the complete graph on n vertices. Then which of the following is not true ?
Kn has n(n-1)/2 edges
| |
Kn is Eulerian for all n ≥ 5 | |
Kn is Hamiltonian for all n ≥ 5 | |
Kn is Non-planar for all n ≥ 5
|
Question 21 Explanation:
Option B is false because the condition for the graph to be eulerian is that the degree of each vertices must be even and the graph must be connected. But the graph K6 will have vertices of odd degree.So option B is false.
Question 22 |
Let T be a tree with 2016 vertices. Let nk denote the number of vertices in T with degree k. Then

2015 | |
4032 | |
4030 | |
6046 |
Question 23 |
Consider an undirected weighted complete graph G with 2016 vertices listed in a set {v1,v2,,..., v2016} such that the weight on edge (vi, vj) is 2|i-j| The weight of a minimum spanning tree of G is
2015 | |
4030 | |
1008 | |
None of the above |
Question 23 Explanation:
The minimum weight that a edge can have inthe graph given above is 2.And every adjacent vertices numerically wil have weight 2.And we know that MST contains n-1 edges,where n=2016.
So weight of MST is (n-1)*2 = (2016-1)*2=4030
So weight of MST is (n-1)*2 = (2016-1)*2=4030
Question 24 |
Let A be the adjacency matrix of an undirected unweighted graph G. The (i,j)th entry of. Ak is equal to1
The number of simple paths of length k from vertex i to j.
| |
The number of walks of length k from vertex i to j. | |
The length of shortest path from vertex i to i. | |
None of these
|
Question 25 |
in a connected planar graph, every vertex has degree 3 and every region has degree
5 or 6. Let P be the number of regions with degree 5. Then P equals to
12 | |
10 | |
11 | |
13 |
Question 26 |
In a graph G, if the set of edges incident on each vertex of G is a cut-set, then the graph G is
separable | |
nonseparable | |
connected | |
Eulerian |
Question 27 |
The number of cut-vertices in a tree with n vertices and m leaves is
n+m | |
n | |
m | |
n-m |
Question 27 Explanation:
The cut vertices is the vertices which disconnects the graph into two or more connected componenets.So leaves can never disconnect tree but internal node can do.So no. of cut vertices in a tree with n vertices and m leaves = n-m.
Question 28 |
Which of the following can be sequences of degree of vertices in a simple connected graph with 6 vertices.
5,4,4,3,2,1 | |
5,4,4,3,2,2 | |
5,4,4,3,2,0 | |
7,5,1,4,2,2 |
Question 28 Explanation:
Apply havel hakemi theorem and you will get option B as the answer.
Question 29 |
If p is the number of active processes, and r is the number of resource types; the time complexity of the Banker's algorithm used for deadlock avoidance is denoted as
O(p2) | |
O(r2) | |
O(p2r) | |
O(pr2) |
Question 29 Explanation:
The time complexity of banker's algorithm is r* (p*p) where p is the number of active processes and r is the number of resources. ... Banker's algorithm is a resource allocation and deadlock avoidance algorithm. Banker's algorithm is generally used to find if a safe sequence exist or not.
Question 30 |
Dining philosopher's problem deals with
Process synchronization | |
Dead-lock Prevention | |
Resource allocation | |
All of the above |
Question 30 Explanation:
Dining Philosophers Problem (DPP) ... A hungry philosopher may only eat if there are both chopsticks available. Otherwise a philosopher puts down their chopstick and begin thinking again. The dining philosopher is a classic synchronization problem as it demonstrates a large class of concurrency control problems.
Question 31 |
The hit ratio of cache memory is the percentage of access (reads and writes)for which data are found in the cache. Write-through, Write-back are two main policies for memory updation. write-allocation is a policy whereby a cache line is allocated and loaded on a write miss. If it is assumed that write-allocation is always used, which of the following is true.
Write-back usually results in a better hit ratio than write-through | |
Write through usually results in a better hit ratio than write-back | |
The percentage of write operations resulting in a main memory operation will never be larger for Write-back than for Write-through | |
Write-through can only be employed in set-associative memory |
Question 31 Explanation:
The percentage of write operations resulting in a main memory operation will never be larger for Write-back than for Write-through,becuase in write back data is updated in the memory only when the cache line is ready to replaced whereas in write through data is simultaneously updated to cache and memory
Question 32 |
The linux command "chmod 761 letter" is equivalent to
chmod u=76 , g= 61, o= 11 letter | |
chmod a=761 letter
| |
chmod 167 letter | |
chmod u=rwx, g=rw, o=x letter |
Question 33 |
An operating system kernel minimizes the frequency of disk access by keeping a pool of internal data buffers which helps to increase the response time, this is known as?
Buffer cache
| |
Spooling | |
Pooling | |
Virtual memory |
Question 33 Explanation:
The buffer cache (in an operating system, but also in a DBMS) is main memory (i.e. RAM) used as a cache to reduce the number of physical read/writes from mass-storage devices (like hard disks, for example), since these operations are slower by several orders of magnitude compared to the same operations done on main memory.
Question 34 |
What is the minimum number of swaps that would take place, using Bubble sort on a list of n numbers ?
(n-1)
| |
n/2
| |
0 | |
log n |
Question 34 Explanation:
The minimum no. of swaps that would take place, using Bubble sort on a list of n numbers is 0,when the elements are already in sorted order.
Question 35 |
If in a data structure, 1000 insertions were interspersed with 1000 searches efficiently, assuming data in this data structure is stored following a uniform random distribution. Then the most appropriate type of data structure for D here is
A linked-list maintained in sorted order | |
A linked-list of unsorted records
| |
A binary search tree | |
An array-based list maintained in sorted order |
Question 36 |
If a process is CPU-bound, which of the following statements is TRUE for better CPU utilization ?
The process should be given higher priority for I/O | |
The process should be given higher priority for CPU | |
The process should be given equal priority as the other process | |
Priority has no effect over the CPU utilization in this case |
Question 37 |
If the capacity of the Translation Look-aside Buffer (TLB) of a 32-bit processor is 512KB and each page table entry needs 4B, what should be the size of the page for the entire page table to fit into the TLB ?
8KB | |
16KB | |
32KB | |
4KB |
Question 38 |
An operating system uses demand paging and local replacement strategy. In such a system, when no free frames are available then the number of frames allocated to a process may be:
constant | |
nothing may be said of them | |
increased | |
decreased |
Question 38 Explanation:
In local page replacement policy when no free frames are available then the number of frames allocated to a process may be constant.
Question 39 |
Which of the following statements is NOT TRUE about compile-time binding:
I. It's an efficient use of main memory.
II. It requires knowledge of the processor architecture and the amount of main memory in the system.
IIi It does not allow swapping of the process.
(I) only | |
(I) and (II) | |
(I) and (III) | |
All of the above
|
Question 40 |
A process moves from RUNNING to READY state when
an interrupt occurs | |
a page fault occurs
| |
a process goes for I/O | |
None of the above |
Question 40 Explanation:
A process moves from RUNNING to READY state when an interrupt occur.
Question 41 |
If a 16MB file has to be stored in a file system with 8KB block size, how many index blocks are required for this file if each block location entry requires 4B ?
2 | |
4 | |
3 | |
1 |
Question 41 Explanation:
No. of blocks = 224/213 = 211
Now no. of entries that can fit in one block = 213/22 = 211
Since, no. of block is 211, so no. of entries required is 211.
And 1 block can hold 211 entries. So only one index block is required.
Now no. of entries that can fit in one block = 213/22 = 211
Since, no. of block is 211, so no. of entries required is 211.
And 1 block can hold 211 entries. So only one index block is required.
Question 42 |
The language L = {ap | where p is any non-prime, non-negative integer} defined over the alphabet Σ = {a} is
Context free | |
Regular | |
Nonregular and does not satisfy pumping Lemma for regular languages | |
Nonregular and but satisfies pumping lemma for regular languages |
Question 42 Explanation:
Since p is a prime no. which is not in arithmetic progression series,so not regular language and also not context free language. But the language satisfies pumping lemma for regular language.
Question 43 |
Which of the following statements are true:
I. Complement of a recursive language is always recursive
IL Complement of a context free language is always context free
III. Concatenation of two recursively enumerable languages is always recursively enumerable
(I) only | |
(II) only | |
(I) and (III) | |
(II) and (III) |
Question 43 Explanation:
(I) is true because recursive language is closed under complementation.
(II) is false because context free language is not closed under complemetation.
(III) is true because recursively enumerable language is closed under concatenation.
(II) is false because context free language is not closed under complemetation.
(III) is true because recursively enumerable language is closed under concatenation.
Question 44 |
Which of the following regular expression is equivalent to (a* + b)*(c + d) ?
a*(c + d) + b(c + d) | |
a*(c + d) + b(c + d) | |
(a* + b)c + (a* +b)d | |
(a+b)*c + (a + b)*d |
Question 44 Explanation:
Lets check option D,
Given (a+b)*c + (a + b)*d
Now take (a+b)* out as common ,then we will get (a+b)*(c+d).and we know that
(a*+b)* = (a+b)*.So we can also write (a+b)*(c+d) as (a* + b)*(c + d) .
Given (a+b)*c + (a + b)*d
Now take (a+b)* out as common ,then we will get (a+b)*(c+d).and we know that
(a*+b)* = (a+b)*.So we can also write (a+b)*(c+d) as (a* + b)*(c + d) .
Question 45 |
Consider a 2Kbyte cache with an 8 byte block size, the cache is initially empty and is being addressed physically and also tagged physically; direct mapping approach is used. Array A of 256 elements with 4 bytes each, and array B of 512 elements with 4 bytes each are stored at physical address 4,096 and 8,192 respectively. The following loop is then executed:
for (i=0; i<256; i++)
A[i]=A[i] + B[2*i] ;
During the execution of the loop, how many bytes will be written to memory if the cache has a write-through policy ?
0 | |
256 | |
1024 | |
2049 |
Question 46 |
Consider a 2Kbyte cache with an 8 byte block size, the cache is initially empty and is being addressed physically and also tagged physically; direct mapping approach is used. Array A of 256 elements with 4 bytes each, and array B of 512 elements with 4 bytes each are stored at physical address 4,096 and 8,192 respectively. The following loop is then executed:
for (i=0; i<256; i++)
A[i]=A[i] + B[2*i] ;
During the execution of the loop, how many bytes will be written to memory if the cache has a write-back policy ?
0 | |
256 | |
1024 | |
2049 |
Question 47 |
Two processors, M-5 and M-7 implement the same instruction set. Processor M-5 uses a 5-stage pipeline and a clock cycle of 10 nanoseconds. Processor M-7 uses a 7-stage pipeline and a clock cycle of 7.5 nanoseconds. Which of tile following are true ?
I. M-7’s pipeline has better maximum throughput than M-5's pipeline
II. The latency of a single instruction is shorter on M-7's pipeline than on M-5's pipeline.
III. Programs executing on M-7 will always run faster than programs executing on M-5.
I only | |
II only | |
I and III only | |
II and III only |
Question 47 Explanation:
→ S1 is True. Throughput is no. of instructions executed per second.
Assuming ideal pipeline with CPI = 1,
→ S2 is False.
The latency of single instruction in M-7 is,
7.5 × 7 = 52.5 ns
The latency of single instruction in M-5 is,
10 × 5 = 50 ns
So, latency of single instruction is longer on M-7’s pipeline than on M-5’s pipeline.
→ S3 is False. Because if the program contains only single instruction then M-5 will run faster than M-7 as we have seen in S2.
Assuming ideal pipeline with CPI = 1,

→ S2 is False.
The latency of single instruction in M-7 is,
7.5 × 7 = 52.5 ns
The latency of single instruction in M-5 is,
10 × 5 = 50 ns
So, latency of single instruction is longer on M-7’s pipeline than on M-5’s pipeline.
→ S3 is False. Because if the program contains only single instruction then M-5 will run faster than M-7 as we have seen in S2.
Question 48 |
In a pipelined RISC computer where all arithmetic instructions have the same cycles per instruction which of the following actions would improve the execution time of a typical program ?
I. increasing the clock cycle rate
II. Disallowing any forwarding in the pipeline
III. Doubling the sizes of the instruction cache and the data cache without changing the clock cycle time
I only | |
III only | |
I and II only | |
I and III only |
Question 48 Explanation:
(I) is true
(II) is false because forwarding in the pipeline reduces hazards,which in turn can improve the execution time.
(III) is true because larger cache size can store more data,hence lower cache miss rate.
(II) is false because forwarding in the pipeline reduces hazards,which in turn can improve the execution time.
(III) is true because larger cache size can store more data,hence lower cache miss rate.
Question 49 |
A virtual memory system has an address space of 8K words, a memory space of 4K, and a page and block sizes of lK words. The following page reference changes occur during a given time interval. (only pages with changes are listed. A page already referenced is not listed again)
4 2 0 1 2 6 1 4 0 1 0 2 3 5 7
Determine the four pages that are resident in the main memory after the end of the page reference changes if the replacement algorithm used is LRU.
1,2,7,5 | |
0,2,7,5 | |
2,7,3,5 | |
None of the above |
Question 50 |
A student is browsing the website wvw.youhoo.co.in She clicks on a URL which is from the same website. Which of the following is a more accurate description of the sequence of events that takes place after the click event
I. 3-way TCP handshake event between client and server
II. HTTP get request event
IIL DNS query and response event
III, I, II
| |
I, II, III | |
III, II, I | |
None of these |
Question 50 Explanation:
The correct sequence is III,I,II because first we have to get IP address of the URL through DNS,then we have to establish connection through 3-way handshaking and then HTTP get request event.
Question 51 |
Two programs A, B have the following sequences of socket calls
A: socket(), bind(), listen(), acceptO, read(), write(), close()
B: socket(), sendto(), recvfrom(), close()
Which of the following most accurately represents the work being done by program A and B respectively ?
connectionless client and connectionless server
| |
connection-oriented client and connectionless server | |
connection-oriented server and connectionless client
| |
connection-oriented client and connectionless Server |
Question 52 |
Automatic Repeat Request Protocol (ARQ) is used for reliable data transfer between two peers. Stop-and-Wait is one of the well known ARQ methods between a network sender agent A and a receiver agent B. ARQ requires retransmission of the previous frame or packet to take place when the retransmission timer is set after the time limit elapses.
Consider the protocol following scenario between A and B agents in a stop-and-wait ARQ
1. Sending agent A transmits a frame numbered 0 and then waits for an acknowledgment (ACK) frame from receiver B.
2. Frame 0 is received by B without error. B transmits ACK frame to A. According to this ARQ protocol, Agent A can transmit frame numbered 1 provided, which of the following events take Place ?
Consider the protocol following scenario between A and B agents in a stop-and-wait ARQ
1. Sending agent A transmits a frame numbered 0 and then waits for an acknowledgment (ACK) frame from receiver B.
2. Frame 0 is received by B without error. B transmits ACK frame to A. According to this ARQ protocol, Agent A can transmit frame numbered 1 provided, which of the following events take Place ?
ACK from B is received without error and retransmission timer at A is set | |
ACK from B is received without error and retransmission timer at A is off(reset) | |
ACK from B is received with error and retransmission timer at A is off (reset) | |
ACK from B is not received and retransmission timer at A is set |
Question 53 |
Automatic Repeat Request Protocol (ARQ) is used for reliable data transfer between two peers. Stop-and-Wait is one of the well known ARQ methods between a network sender agent A and a receiver agent B. ARQ requires retransmission of the previous frame or packet to take place when the retransmission timer is set after the time limit elapses.
The main problem with the Stop-and-Wait ARQ approach which needs improvement leading to Go-back N or Selective Repeat ARQ approaches is
Stop-and-Wait is not actually reliable | |
Stop-and-Wait cannot be used at the transport layer level | |
Stop-and,-War't requires wireless transmission | |
Stop-and,-Wait is not at all efficient at utilizing the transmission capacity of the
Iink
|
Question 53 Explanation:
Stop and wait may cause big performance issues as sender always waits for acknowledgement even if it has next packet ready to send. Consider a situation where you have a high bandwidth connection and propagation delay is also high (you are connected to some server in some other country though a high speed connection). To solve this problem, we can send more than one packet at a time with a larger sequence numbers, which is done in GBN or SR protocol.
Question 54 |
IP addresses are generally written in the dotted-decimal notation. Given the IP address in binary is
1000000010000 1 1 10100010000000101
Using dotted decimal notation it is written as
100.000001.00001.100 | |
80.87.66.05 | |
135.128.68.5 | |
128.135.68.5 |
Question 54 Explanation:
There are four octets in IP address each of 8 bits.And each 8 bits can be represented in decimal. So the IP address using dotted decimal is,


Question 55 |
Which of the following is not provided by UDP:
I. Source port
IL Destination Port
III. Reliable transport service
IV. Count of number of bytes in datagram
III Only | |
IV only | |
II and IV | |
III and IV |
Question 55 Explanation:
UDP provide Source port no., destination port no. ,length and checksum but not reliability.
Question 56 |
Many differing views have been expressed with regard to the relation of the state of the brain to the phenomenon of consciousness. There is remarkably little consensus of opinion for a phenomenon of such obvious importance. It is clear, however, that all parts of the brain are not equally involved in its manifestation. For example, as hinted above, the cerebellum seems to be much more of an 'automaton' than the cerebrum. Actions under cerebellar control seem almost to take place by themselves without one having to think about them. While one may consciously decide to walk from one place to another, one does not often become aware of the elaborate plan of detailed muscle movements that would be necessary for controlled motion. The same may be said of unconscious reflex actions, such as the removal of one's hand from a hot stove, which might be mediated not by the brain at all but by the upper part of the spinal column. Flom this, at least, one may be well inclined to infer that the phenomenon of consciousness is likely to have more to do with the action of the cerebrum than with the cerebellum or the spinal cord.
The actions that happen mostly by itself without being consciously planned, are controlled by
Cerebrum control | |
Cerebellum control | |
Cerebellar control | |
Spinal cord control |
Question 57 |
Many differing views have been expressed with regard to the relation of the state of the brain to the phenomenon of consciousness. There is remarkably little consensus of opinion for a phenomenon of such obvious importance. It is clear, however, that all parts of the brain are not equally involved in its manifestation. For example, as hinted above, the cerebellum seems to be much more of an 'automaton' than the cerebrum. Actions under cerebellar control seem almost to take place by themselves without one having to think about them. While one may consciously decide to walk from one place to another, one does not often become aware of the elaborate plan of detailed muscle movements that would be necessary for controlled motion. The same may be said of unconscious reflex actions, such as the removal of one's hand from a hot stove, which might be mediated not by the brain at all but by the upper part of the spinal column. Flom this, at least, one may be well inclined to infer that the phenomenon of consciousness is likely to have more to do with the action of the cerebrum than with the cerebellum or the spinal cord.
Consciousness is possibly more to do with the actions of
Cerebrum | |
Cerebellum | |
Spinal cord | |
All the above |
Question 58 |
Many differing views have been expressed with regard to the relation of the state of the brain to the phenomenon of consciousness. There is remarkably little consensus of opinion for a phenomenon of such obvious importance. It is clear, however, that all parts of the brain are not equally involved in its manifestation. For example, as hinted above, the cerebellum seems to be much more of an 'automaton' than the cerebrum. Actions under cerebellar control seem almost to take place by themselves without one having to think about them. While one may consciously decide to walk from one place to another, one does not often become aware of the elaborate plan of detailed muscle movements that would be necessary for controlled motion. The same may be said of unconscious reflex actions, such as the removal of one's hand from a hot stove, which might be mediated not by the brain at all but by the upper part of the spinal column. Flom this, at least, one may be well inclined to infer that the phenomenon of consciousness is likely to have more to do with the action of the cerebrum than with the cerebellum or the spinal cord.
Which of the statements below is correct
I. Brain is solely responsible for individual's consciousness
II. Parts of the brain are equally involved in the making of one's consciousness
I | |
II | |
I and II | |
None of the above |
Question 59 |
Many differing views have been expressed with regard to the relation of the state of the brain to the phenomenon of consciousness. There is remarkably little consensus of opinion for a phenomenon of such obvious importance. It is clear, however, that all parts of the brain are not equally involved in its manifestation. For example, as hinted above, the cerebellum seems to be much more of an 'automaton' than the cerebrum. Actions under cerebellar control seem almost to take place by themselves without one having to think about them. While one may consciously decide to walk from one place to another, one does not often become aware of the elaborate plan of detailed muscle movements that would be necessary for controlled motion. The same may be said of unconscious reflex actions, such as the removal of one's hand from a hot stove, which might be mediated not by the brain at all but by the upper part of the spinal column. Flom this, at least, one may be well inclined to infer that the phenomenon of consciousness is likely to have more to do with the action of the cerebrum than with the cerebellum or the spinal cord.
Unconscious reflex actions are the set actions planned by
Cerebrum | |
Cerebellum | |
Spinal cord | |
All the above |
Question 60 |
Using the standard C library which of the following will return zero for a strict equality testing of two arrays pointed by S1 and S2?
I. int memcmp(const void xs1, const void *s2, size-t n))
II. array array-diff-assoc( array $s1, array $s2 );
IiI. int bcmp(const void xs1, const void *s2, size-t n);
II oniy
| |
I and II only | |
II and III only | |
I and III only |
Question 61 |
Consider the statements
I. int *func(int a, float b); and
II. int (*func) (int a, float b);
Which of the following is more correct regarding statements I and II respectively ?
they represent function returning pointer to int and pointer to function returning int | |
both are equivalent and are returning int
| |
both are equivalent and are returning a pointer to type int | |
neither of them is returning a pointer to type int |
Question 61 Explanation:
I represents function returning pointer to int.
II represents pointer to the function returning int.
II represents pointer to the function returning int.
Question 62 |
Which of the following standard C library functions is best used to find the last occurrence of a character in a string ?
strnstr() | |
strrchr() | |
strstr() | |
None of these is useful. Its better to use strcmp() |
Question 62 Explanation:
Strrchr() is best used to find the last occurence of a character in a string.
Question 63 |
Let T be a balanced tree with height 5. It is seen that every internal node in T at
depth k from the root node, has 25-k child nodes. The number of leaf nodes in T is
25 | |
26 | |
230 | |
215 |
Question 64 |
In which of the following parameter passing mechanisms the actual parameters are re-evaluated on each access ?
Call by Name | |
Call by Value | |
Call by Value Result | |
Call by Result |
Question 64 Explanation:
Call by name reevaluate the actual parameter on every use.
Question 65 |
Time complexity of an algorithm is denoted by T(n), where n is the input size. For a particular algorithm:
T(n)=T(n - 1) + 1/n, n>1, also note that T(n)=1 otherwise.
The time complexity of this algorithm is best approximated by
log n | |
n | |
n2 | |
nn |
Question 65 Explanation:
T(n) = T(n-1) + 1/n ---(I)
T(n-1) = T(n-2) + 1/n-1 ---(II)
T(n-2) = T(n-3) + 1/n-2 ---(III)
Putting (III) in (II), we get
T(n-1) = T(n-3) + 1/n-1 + 1/n-2 ---(IV)
Putting (IV) in (I), we get
T(n) = T(n-3) + 1/n + 1/n-1 + 1/n-2
፧
T(n) = T(n-k) + 1/n-(n-1) + 1/n-(n-2) + … + 1/(n-1) + 1/n
Given t(1) = 1
So, Let n-k = 1
k = n-1
Now,
T(n) = T(1) + 1/n-(n-2) + 1/n-(n-3) + … + 1/n-1 + 1/n
= 1+ ½ + ⅓ + … 1/n-1 + 1/n
= log n
T(n-1) = T(n-2) + 1/n-1 ---(II)
T(n-2) = T(n-3) + 1/n-2 ---(III)
Putting (III) in (II), we get
T(n-1) = T(n-3) + 1/n-1 + 1/n-2 ---(IV)
Putting (IV) in (I), we get
T(n) = T(n-3) + 1/n + 1/n-1 + 1/n-2
፧
T(n) = T(n-k) + 1/n-(n-1) + 1/n-(n-2) + … + 1/(n-1) + 1/n
Given t(1) = 1
So, Let n-k = 1
k = n-1
Now,
T(n) = T(1) + 1/n-(n-2) + 1/n-(n-3) + … + 1/n-1 + 1/n
= 1+ ½ + ⅓ + … 1/n-1 + 1/n
= log n
Question 66 |
Which of the following is the most accurate description of the Breadth-First graph traversal approach ?
Traverses a single path of the graph until it visits a node with no successor | |
Finds the short past through the graph | |
Traverses all successors of a visited node before visiting any successors of any of those successors
| |
Traverses and visits nodes in a random order but ensures visiting every node
|
Question 66 Explanation:
Breadth-first search is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root, and explores all of the neighbor nodes at the present depth prior to moving on to the nodes at the next depth level.
Question 67 |
In the following C language function, Iet n ≥ m. How many recursive calls are made by this function ?
int gcd(n,n)
{
if(n%m ==0) return m;
n=n%n;
return gcd(n,n)
}
O(log2 n) | |
O(n) | |
O(√n) | |
O(log2 log2n) |
Question 67 Explanation:
If we consider worst case then it will be option a ... as an example take n=11 m=8 .. it will be O(logn)
Question 68 |
A B-Tree of order 4 is built from scratch by 10 successive insertions. What is the maximum number of node splitting operations that may take place ?
5 | |
6 | |
4 | |
3 |
Question 68 Explanation:
Each node can contain maximum 4-1=3 elements. And if the 4th element comes to the node then it will get split.
Now let’s try to split the nodes maximum no. of times,
Insert 1,2,3,4





Now let’s try to split the nodes maximum no. of times,
Insert 1,2,3,4





Question 69 |
What is the time required to insert n more elements to a binary heap of n elements?
O(nlog n) | |
O(log n) | |
O(n^2) | |
O(n) |
Question 69 Explanation:
To insert 1 element it requires O(logn) time.So to insert n elements it requires O(nlogn) time.
Question 70 |
A clustering index is defined on the fields which are of type
non-key and non-ordering | |
non-key and ordering | |
key and ordering | |
key and non-ordering |
Question 70 Explanation:
Clustering is defined on the fields which is non-key and ordering.
Question 71 |
Let X be a binomial random variable with n=5 and P=0.5 consider random variable Y defined as
Y= X mod 2 Then Pr(Y=0) is
1/32 | |
⅛ | |
½ | |
1 |
Question 72 |
The general expression for the sequence an where an=4an-1 + 5an-2 , a1=2 and a2=6 is
![]() | |
![]() | |
![]() | |
![]() |
Question 72 Explanation:


Question 73 |
Choose the best data structure that can be used by a search engine ibr ranking, accumulating score and presenting top ten results based on their scores
a binary search tree | |
a heap | |
a stack | |
a queue |
Question 74 |
The relation R is represented by the matrix 'A' given as

If the inverse relation of R is defined as R-1 : {(b, a)l(a, b) Ɛ R} Then the matrix representing the inverse relation is
A | |
A-1 | |
AdjA | |
A2 |
Question 75 |
Consider the following context free grammar where Ɛ is null string
S→ aSb | bsa | SS | Ɛ
which of the following best characterises the language generated by above grammar
All palindromes over a and b | |
All strings with equal number of a’s and b’s | |
All even-length strings of a's and b's | |
All strings of the form ai bj ak such that i + j = k |
Question 75 Explanation:
The given grammar generates the language having all strings with equal no. of a’s and b’s.
There are 75 questions to complete.