U.G.C. NET Exam. December 2022 Paper-II (COMPUTER SCIENCE) and Applicatations.

Total Questions: 100

11. Allowing different derived classes to be used interchangeably though the interface provided by a common base class is called _____

Correct Answer: (d) Run time polymorphism
Solution:

Run time polymorphism- This is achieved through the use of virtual functions and is a fundamental concept in object oriented programming. At runtime the appropriate derived class's implmentation is called based on the actual type of the object being referred to through a pointer or reference to the base class. This allows for dynamic dispatch and enables the program to behave polymorphically choosing the appropriate method implementation based on the actual runtime type of the object. So option (d) is correct.

12. In ______ cruve the last and the first vertices of the polygon lie on the curve and all other vertices define the derivatives order and shape of the curve.

Correct Answer: (c) Bezier curve
Solution:

In a Bezier curve, the first and the last vertices of the polygon lie on the curve, and all the other vertices (also called control points) define the derivatives, order and shape of the curve. Bezier curves are commonly-aided design (CAD) applications for creating smooth curves and surfaces. They are define by Bernstein polynomials and offer precise control over the shape of the curve by adjusting the positions of the control points.

13. A ______ operation combines the rows of the two relations and outputs a new relation that has both input relations rows in it.

Correct Answer: (b) Union
Solution:

The operation that combines the rows of two relations and outputs a new relation that has both input relation's rows in its is the "Union operation. So the option (b) is correct.

14. Consider the relation R(P, Q, R, S, T, U, V, W, X, Y) and FDs :

{P, Q, S} → T
R → Y
{P, Q} → V
{R, X} → X
Q → U
V →{W, X}
Which of the following is a candidate key?

Correct Answer: (a) {P, Q, R, S}
Solution:

15. Which RAID level is appropriate for storing the log file of a ticket booking system where a huge database update is required?

Correct Answer: (b) Level 1
Solution:

RAID (Redundant Array of Independent Disks) Level 1 provided mirroring, meaning that data is duplicated across two or more drives. In this configuration, all data written to one drive is also written to another drive in real-time. This redundancy ensures data integrity and availability making it a suitable choice for storing critical log file that must be preserved and protected during a huge database update. So option (b) is correct.

16. If we convert a decision tree to a set of logical rules then :

Correct Answer: (d) The internal nodes in a branch are connected by OR and branches by AND
Solution:

The correct statement is : The internal nodes in a branch are connected by "AND" and branches by "OR".
When converting a decision tree into a set of logical rules, each path from the root to a leaf in the decision tree represents a conjunction of conditions, and the different paths branches are combined using the logical OR operation. Each internal node in a branch represents a condition connected by logical AND. By following this approach you can express the decision tree as a set of logical rules that capture the same decision - making process.

17. Model of protection can be viewed as

Correct Answer: (c) Access Matrix
Solution:

18. Process in memory also contain the heap section. What is the use of heap section?

Correct Answer: (b) Dynamically allocate the memory during process run time
Solution:

The heap section in memory is crucial for managing dynamically allocate data during a process's runtime. It allow programs to allocate memory as needed, making it possible to handle data with varying sizes and life spans efficiently. However proper memory management is essential to prevent memory leaks and excessive memory consumption.
So option (b) is correct.

19. How many page faults occur for optimal algorithm for the following string with four frames?

1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8

Correct Answer: (a) 8
Solution:

The given reference string :
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8
Number of frames : 4
Let's simulate the algorithm step by step
1. Frame status [–, –, –,–] page fault! Page 1 is loaded into frame 1.
2. Frame status : [1, –, –, –] Page fault! Page 2 is loaded into frame 2.
3. Frame status : [1, 2, –, –] page fault! Page 3 is loaded into frame 3.
4. Frame status : [1, 2, 3, –] page fault! Page 4 is loaded into frame 4.
5. Frame status : [1, 2, 3, 4] page fault! Page 5 is loaded into frame 1.
6. Frame status : [5, 2, 3, 4] page fault! Page 3 is already in a frame so no page fault occurs.
7. Frame status : [5, 2, 3, 4] page fault! Page 4 is already in a frame, so no page fault occurs.
8. Frame status : [5, 2, 3, 4] page fault! Page 1 is already in a frame, so no page fault occurs.
9. Frame status : [5, 2, 3, 4] page fault! Page 6 is loaded into frame 2.
10. Frame status : [5, 6, 3, 4] page fault! Page 7 is loaded into frame 3.
11. Frame status : [5, 6, 7, 4] page fault! Page 8 is loaded into frame 4.
12. Frame status : [5, 6, 7, 8] page fault!
Now, when Page 7 is requested again, it will be replaced because it's the last occurrence in the reference string that requires a page replacement. Total page faults : 8
So, for the given reference string and four frames the optimal algorithm result in 8 page faults.

20. Degree of concurrency in thread can be arranged in the manner.

Correct Answer: (c) many-to-many > many-to-one>one-to-one
Solution:

The correct arrangement of degree of concurrency from highest to lowest is many-to-many > many-to-one > one- to - one.