U.G.C. NET Exam. December 2022 Paper II (COMPUTER SCIENCE) And Applicatation.

Total Questions: 100

11. If a constructor 'Date' is declared explicitly and has to be defined outside the class, which of the following is correct?

Correct Answer: (a) Data::Date(int dd) {/*...*/}
Solution:

Constructor Defined Outside the class–The constructor can be defined outside the class but it has to be declared inside the class. Here you will use the scope resolution operator.
The syntax for constructor definition outside class :
Class Class_Name {
Public :
Class name ();
},
// Constructor definition outside class
Class name :: Class name ()
{
}
So option (a) is correct answer.

12. Which one of the following allows the session to continue?

Correct Answer: (d) When the user refreshes the browser and there is a persistent cookie.
Solution:

Persistent cookies are stored on a user's device to help remember information settings, preferences, or sign on credentials that a user has previously saved persistent cookies track visitors as they move around the website to figure out what people like about the website to help improve the user experience. The most popular persistent cookie is a Google Analytics Cookie.
Session cookies is also called, Non-persistent cookies or temporary cookies are storied in memory and never written to the disk. Session cookies remain active as long as the browser remains active-once the browser is closed, the cookies vanish.

13. Overfitting is expected when we observe that?

Correct Answer: (b) With training iterations error on training set decrease but test set increases
Solution:

Overfitting is expected–
• High training accuracy, but low test accuracy when a model achieves a high accuracy on the training data but performs poorly on unseen data, it suggests overfitting. The model has essentially "memorized" the training examples including the noise or irrelevant patterns and cannot generalize well.

14. Identify the incorrect statement(s).

Correct Answer: (b) A candidate key for which no proper subset is also a candidate key is called a super key.
Solution:

Candidate key : The minimal set of attributes that can uniquely identify a tuple is know as a candidate kay.

15. Consider the two relations below. The primary keys are underlined. Identify all possible foreign key(s) from the options based only on the two relations.

EMP (eid, ename, did)
DEPT (did, dname)

Correct Answer: (b) did
Solution:

Primary key – is a column or group of columns in a table that uniquely indentify every row in that table.
Foreign key – is a column that creates a relationship between two tables. The purpose of foreign keys is to maintain data integrity and allow navigation between two different instances of an entity. So, only did "because the did in employee table will reference to did in department table ; since there could be no employee working in a department which does not exist in the department table.

16. Which of the following statement is correct, according to the following instance of the relational schema R(X, Y, Z)?

Correct Answer: (c) X→Y, X→Z
Solution:

17. In Linux Operating System, when _____ is invoked, it is passed a set of flags that determine how much sharing is to take place between the parent and child tasks.

Correct Answer: (b) clone()
Solution:

The main use of clone () is to implement threads : multiple threads of control in a program that run concurrently in a shared memory space. The clone () system call is an upgraded version of the fork call. It's powerful science it creates a child process and provides more precise control over the data shared between the parent and child processes.

18. The main function of the microkernel is to provide a communication facility between the _____ program and the various ________ that are also running in user space.

Correct Answer: (c) Client, Services
Solution:

The microkernel is one of the Kernel's classification being a Kernel it handles all system resources. It provides a minimal amount of process and memory management services. The interaction between the client application and services running in user address space is established via message passing that helps to reduce the speed of microkernel execution.

19. Consider an operating system capable of loading and executing a single sequential user process at a time. The disk head scheduling algorithm used is first come first served (FCFS). If FCFS is replaced by shortest seek time first (SSTF) and the vendor claims 50% better benchmark results. What is the expected improvement in the I/O performance of user programs?

Correct Answer: (d) 0%
Solution:

"Single sequential user process". So all the requests to disk scheduler will be in sequence and each one will be blocking the execution and hence there is no use of any disk scheduling algorithm. Any disk scheduling algorithm gives the same input sequence and hence the improvement will 0% for SSTF over FCFS.

20. For the following set of processes scheduled using FCFS policy, determine the average waiting time. Assume that the process arrived in the order P1, P2, P3, P4.

Correct Answer: (b) 16
Solution:

Given that the process arrived in the order P1, P2, P3, P4,