← MES Jr. Grade

Past Questions — 2015

MES Jr. Grade • 2015 • Paper-II

Which of the following gets called when an object goes out of scope?

A) Constructor
B) Destructor
C) main
D) virtual function
When an object goes out of scope, its destructor is automatically called to clean up resources and perform object destruction. A constructor is called when an object is created, not when it ends. 'main' is the program entry point, and a virtual function is used for runtime polymorphism, not object cleanup.
MES Jr. Grade • 2015 • Paper-II

The following program: main() { if(fork()>0) sleep(100); } results in the creation of

A) an orphan process
B) a zombie process
C) a process that executes forever
D) None of these
After fork(), two processes exist: the parent and the child. In the parent, fork() returns a positive value, so the condition if(fork()>0) is true and the parent executes sleep(100). The child gets 0 from fork(), so it does not sleep and exits immediately. Since the parent is still alive but has not yet waited for the child, the terminated child remains in the process table as a zombie process until the parent wakes up or terminates and reaps it. It is not an orphan process because the parent is still running, and it does not execute forever.
MES Jr. Grade • 2015 • Paper-II

From which stream does the program receive data?

A) Cin
B) Cout
C) Cerr
D) All of these
In C++, `cin` is the standard input stream used to receive data from the keyboard or other input source. `cout` is the output stream, and `cerr` is the standard error stream. Therefore, the correct answer is `Cin`.
MES Jr. Grade • 2015 • Paper-II

When a base class is privately inherited by the derived class, then

A) protected members of the base class become private members of derived class
B) public members of the base class become private members of derived class
C) both (a) and (b)
D) only (b)
In private inheritance, the public and protected members of the base class are inherited as private members in the derived class. Therefore, protected members become private, and public members also become private. So both (a) and (b) are correct.
MES Jr. Grade • 2015 • Paper-II

What is dispatch latency?

A) The time taken by the dispatcher to stop one process and start another
B) The time taken by the processor to write a file into disk
C) The whole time taken by all processors
D) None of these
Dispatch latency is the time required by the operating system's dispatcher to switch the CPU from one process to another. It includes stopping the currently running process, saving its state, and starting the next process. Option (b) is about disk I/O, and (c) is unrelated. Therefore, (a) is correct.
MES Jr. Grade • 2015 • Paper-II

Intensity range of a 8 pixel image is

A) 0 to 7
B) 0 to 25
C) 0 to 255
D) 0 to 225
An 8-pixel image here is intended to mean an 8-level grayscale image, so the intensity values range from 0 to 2^3 - 1 = 7. Therefore the correct range is 0 to 7. The other options correspond to different bit depths: 0 to 255 is for 8-bit images, while 0 to 25 and 0 to 225 are not standard intensity ranges.
MES Jr. Grade • 2015 • Paper-II

In which file mode open() fails if the file already exists?

A) ios:: trunk
B) ios::nocreate
C) ios::write
D) ios::noreplace
In C++ file handling, `ios::noreplace` opens a file only if it does not already exist. If the file already exists, `open()` fails. Why others are incorrect: - `ios::trunk` (likely meant `ios::trunc`) truncates an existing file, not fail. - `ios::nocreate` means do not create a new file; it is not the standard mode for failing when a file already exists. - `ios::write` is used for output/write access and does not by itself cause failure on existing files. So the correct answer is `ios::noreplace`.
MES Jr. Grade • 2015 • Paper-II

Exception handling is targeted at

A) Run-time error
B) Compile time error
C) Logical error
D) All of these
Exception handling is used to deal with abnormal situations that occur during program execution, such as divide-by-zero, file not found, or null reference errors. These are run-time errors. Compile-time errors are caught by the compiler, and logical errors are mistakes in program logic; exception handling does not primarily target them. Therefore, the correct answer is Run-time error.
MES Jr. Grade • 2015 • Paper-II

Round-robin scheduling

A) allows interactive tasks quicker access to the processor
B) gives each task the same chance at the processor
C) is quite complex to implement
D) allows processor-bound tasks more time in the processor
Round-robin scheduling assigns each process an equal time slice in cyclic order, so every task gets the same chance to use the CPU. It is especially fair for time-sharing systems. Option (a) is more about responsiveness, but the defining feature is equal CPU opportunity. Option (c) is incorrect because round-robin is relatively simple to implement. Option (d) is incorrect because it does not favor processor-bound tasks; all tasks are treated equally.
MES Jr. Grade • 2015 • Paper-II

Runtime polymorphism is achieved by

A) Friend function
B) Virtual function
C) Function overloading
D) Operator overloading
Runtime polymorphism in C++ is achieved through virtual functions. When a base class function is declared virtual and overridden in a derived class, the function to be called is decided at runtime based on the actual object type. Friend functions do not provide polymorphism, and function overloading and operator overloading are examples of compile-time polymorphism.
MES Jr. Grade • 2015 • Paper-II

When we select a portion of image and making invisible or not showing the rest. What will you call this?

A) Windowing
B) Clipping
C) Viewport
D) None of these
Clipping is the process of selecting a portion of an image or scene and making the rest invisible. It removes the parts outside the selected region. Windowing refers to defining the area of interest, and viewport is the display area on the output device.
MES Jr. Grade • 2015 • Paper-II

Frame Buffer is also known as

A) Refresh Buffer
B) Memory Buffer
C) Both (a) and (b)
D) None of these
A frame buffer stores the pixel values for the image currently being displayed on the screen, and it is also called a refresh buffer because the display is continuously refreshed from this memory. Option (b) is not the standard term, so the correct answer is (a).
MES Jr. Grade • 2015 • Paper-II

The address of a page table in memory is pointed by

A) stack pointer
B) page table base register
C) page register
D) program counter
In paging, the page table is stored in main memory, and its starting address is kept in the Page Table Base Register (PTBR). The CPU uses this register to locate the page table for address translation. The other options are unrelated: the stack pointer points to the top of the stack, the program counter holds the next instruction address, and 'page register' is not the standard register used for page table address.
MES Jr. Grade • 2015 • Paper-II

The amount of light emitted by the phosphor coating depends on the

A) Number of electrons striking the screen
B) Speed of electrons striking the screen
C) Distance from the cathode to the screen
D) None of these
In a CRT display, the phosphor coating glows when struck by electrons. The brightness of the emitted light depends mainly on how many electrons hit the screen: more electrons produce more light. The speed of electrons affects their energy, but in standard computer graphics MCQs, the expected answer is the number of electrons striking the screen. Distance from the cathode to the screen is not the direct factor.
MES Jr. Grade • 2015 • Paper-II

A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical section problem.

A) One
B) Two
C) Three
D) Four
To solve the critical section problem, processes need at least one shared variable (such as a lock, turn variable, or flag) to coordinate entry into the critical section. With one properly shared synchronization variable, mutual exclusion can be enforced. Therefore, the minimum required is one variable. The other options are not minimum requirements.
MES Jr. Grade • 2015 • Paper-II

Default constructor has

A) Single argument
B) Multiple arguments
C) No argument
D) Cannot say
A default constructor is a constructor that can be called without passing any arguments. In object-oriented programming, if no constructor is defined, many languages provide a default no-argument constructor. Therefore, the correct answer is 'No argument'. Options (a) and (b) describe parameterized constructors, and (d) is incorrect because the definition is specific.
MES Jr. Grade • 2015 • Paper-II

A direct method of deadlock prevention is to prevent the occurrences of

A) Mutual exclusion
B) Hold and wait
C) Circular waits
D) No preemption
Deadlock can occur only if all four Coffman conditions hold: mutual exclusion, hold and wait, no preemption, and circular wait. A direct method of deadlock prevention is to break one of these conditions. Preventing circular wait is the most direct method, usually by imposing an ordering on resource requests. The other options are also deadlock conditions, but the standard direct prevention method referred to in such questions is circular wait.
MES Jr. Grade • 2015 • Paper-II

Vector graphics is composed of

A) Pixels
B) Paths
C) Palette
D) All of these
Vector graphics are made up of mathematical descriptions of shapes such as lines, curves, and polygons, which are represented as paths. Pixels are the basic unit of raster graphics, not vector graphics. A palette refers to a set of colors, not the structure of vector images. Therefore, the correct answer is Paths.
MES Jr. Grade • 2015 • Paper-II

The LRU algorithm pages out page

A) That have been used recently
B) That have not been used recently
C) That have least used recently
D) None of these
LRU stands for Least Recently Used. In page replacement, it removes the page that has not been used for the longest time, i.e., the page least recently referenced. So the correct choice is the one saying pages that have not been used recently. Option (a) is the opposite, and (c) is poorly worded but not the standard definition.
MES Jr. Grade • 2015 • Paper-II

To have a pointer to class member it must be declared as

A) Public
B) Private
C) Protected
D) All of these
A pointer to a class member can be formed for members with any access specifier: public, private, or protected. Access control affects whether you can use the member from outside the class, but it does not prevent the member from being declared or having its address taken in the appropriate context. Therefore, the correct option is 'All of these'.
MES Jr. Grade • 2015 • Paper-II

Which type data structure is used for efficient implementation of scan-line algorithm to fill regions?

A) Node list
B) Edge list
C) Stack
D) None of these
In the scan-line polygon fill algorithm, an edge list is used to store and process the polygon edges efficiently. It helps quickly determine which edges intersect the current scan line and supports fast filling of regions. A node list is not the standard structure for this purpose, and a stack is not used for the core scan-line filling process.
MES Jr. Grade • 2015 • Paper-II

A process control block does not contain

A) Program counter
B) Bootstrap program
C) Stack
D) Code
A Process Control Block (PCB) stores information needed to manage a process, such as the program counter, CPU registers, process state, scheduling information, and memory-management details. It may also be associated with stack-related information. The bootstrap program is not part of a PCB; it is a system startup program used to initialize the computer and load the operating system.
MES Jr. Grade • 2015 • Paper-II

Random scan systems are designed for

A) Line drawing application
B) Pixel drawing application
C) Color drawing application
D) None of these
Random scan systems are vector display systems. They draw images by directing the electron beam only along the required lines and curves, so they are best suited for line drawings and engineering graphics. They are not designed for pixel-based or color-filled raster images. Hence, the correct answer is line drawing application.
MES Jr. Grade • 2015 • Paper-II

Hue of a color is related to

A) Luminance
B) Saturation
C) Wavelength
D) None of these
Hue refers to the basic color type, such as red, green, or blue, and is determined by the dominant wavelength of light. Luminance describes brightness, and saturation describes the purity or intensity of a color. Therefore, hue is related to wavelength.
MES Jr. Grade • 2015 • Paper-II

In multi-level inheritance, the middle class acts as

A) Base class
B) Derived class
C) Both (a) and (b)
D) None of these
In multi-level inheritance, a class in the middle inherits from a base class and is also inherited by another class. So it acts as a derived class with respect to its parent, and as a base class with respect to its child. Therefore, the correct answer is Both (a) and (b).
Page 43
← Prev Next →