3i Infotech Papers: Sample Questions 780  782 of 1245
Examrace Placement Series prepares you for the toughest placement exams to top companies.
Question number: 780
Write in Short
Explain Belady’s Anomaly.
Explanation

Belady’s Anomaly is also called a FIFO anomaly.

Increasing number of frame allocated to a process virtual memory should make execution faster, because few page faults occur.

However, reverse happens i. e. the execution time increases as more frames are allocated.

Caused by certain page reference patterns.

Last replacement use page (LRU) algorithm is free from Belady’s anomaly.
Question number: 781
Describe in Detail
enum colors {BLACK, BLUE, GREEN}
main()
{
printf( “%d. %d. %d” BLACK, BLUE, GREEN);
return(1);
}
Explanation
 In a program
enum colors {BLACK, BLUE, GREEN}  Define the enum type 
 An enumeration consists of a set of named integer constants. Enum assigns numbers starting from 0, if not explicitly defined 

So the answer is 0.1. 2
Question number: 782
Describe in Detail
What is spanning Tree?
Explanation

A spanning tree subset of Graph G, with all the vertices covered with minimum possible number of edges.

So, spanning tree does not have cycles

It cannot be disconnected.

Every connected and undirected Graph G has at least one spanning tree.

A disconnected graph does not have any spanning tree; it cannot be span all its vertices.

The complete undirected graph has maximum number of spanning trees.

The above for example has possible spanning trees.