U.G.C. NET Exam. December 2023 Paper II (COMPUTER SCIENCE)

Total Questions: 100

81. Arrange the following phases of a compiler as per their order of execution (start to end)

(A) Target code generation
(B) Syntax Analysis
(C) Code optimization
(D) Semantic Analysis
(E) Lexical Analysis
Choose the correct answer from the options given below

Correct Answer: (c) (E), (B), (D), (C), (A)
Solution:

Compiler operates in various phases each phase transforms the source program from one representation to another. Every phase takes inputs from its previous stage and feeds its output to the next phase of the compiler.
The phases of a compiler are
1. Lexical analysis
2. Syntax analysis
3. Semantic analysis
4. Intermediate code generator
5. Code optimizer
6. Target code generation

82. The prototyping model has the sequence:

(A) Customer Evaluation
(B) Quick design
(C) Requirements
(D) Implement
(E) Design
Choose the correct answer from the options given below:

Correct Answer: (c) (C)→(B)→(D)→(A)→(E)
Solution:

The correct sequence for the prototyping model isExplanation-
(C) Requirements- Gather initial requirements.
(B) Quick Design- Create a basic design or prototype.
(D) Implement - Develop the prototype.
(A) Customer Evaluation - Present the prototype to the customer for evaluation.
(E) Design- Refine and finalize the design based on feedback.

83. Arrange the following encoding strategies used in Genetic Algorithms (GAs) in the correct sequence starting from the initial step and ending with the final representation of solutions:

(A) Binary Encoding
(B) Real valued Encoding
(C) Permutation Encoding
(D) Gray coding
Choose the correct answer from the options given below:

Correct Answer: (c) (C), (D), (A), (B)
Solution:

The correct answer is (C), (D), (A), (B) Permutation Encoding- In this encoding strategy the representation of solutions is done by permuting the order of element in the solutions space. Gray coding- Gray coding is a binary numeral system where two successive values differ in only one bit. In the context of generic algorithm. Gray coding is used to reduce the chance of introducing errors during the encoding and decoding processes.
Binary Encoding- Binary encoding is the most basic form of ending where each parameter of a solution is represented as a string of binary digits (Os and 1s). Real valued Encoding- Real valued encoding is used when the parameters of the solution space are continuous. In this encoding real number are used to represent the values of parameters.

84. Arrange the following steps in the correct order for a DHCP Client to renew its IP lease with a DHCP server :

(A) DHCP client sends a DHCPREQUEST message
(B) DHCP server acknowledges the renewal with a DHCPACK message
(C) DHCP client checks the local lease timer and initiates renewal
(D) DHCP server updates its lease database
Choose the correct answer from the options below : 

Correct Answer: (d) (C), (A), (B), (D)
Solution:

The correct order for a DHCP client to renew its IP lease with a DHCP server is-
(C) The DHCP client checks the local lease timer and initiates renewal.
(A) The DHCP client lends a DHCPREQUEST message to the DHCP server requesting to renew its lease.
(B) The DHCP server acknowledge the renewal with a DHCPACK message.
(D) The DHCP server updates its lease database to reflect the renewed lease.

85. Arrange the following steps in the correct sequence for applying an unsupervised technique such as K-means clustering is to a data set :

(A) Randomly initialize cluster centroids
(B) Assign each data point to nearest centroid
(C) Update the cluster centroids based on the mean of data points assigned to each cluster
(D) Specify the number of clusters
(K) to partition the data into
(E) Repeat steps B and C until convergence criteria are met
Choose the correct answer from the options given below :

Correct Answer: (a) (D), (A), (B), (C), (E)
Solution:

The correct order of a unsupervised learning technique such as k-means clustering.
(D) Specify the number of clusters
(K) to partition the data into.
(A) Randomly initialize cluster centroids.
(B) Assign each data point to nearest cluster centroids.
(C) update the cluster centroids based on the mean of data point assigned to each cluster.
(E) Repeat steps B and C until convergence criteria are met.

86. Given below are two statements:

Statement (I) : If H is non empty finite subset of a group G and ab∈H ∀ a, b∈H, then H is also a group
Statement (II) : There is no homomorphism exist from (Z, +) to (Q, +); where Z is set of integers and Q is set of rational number.
In the light of the above statements, choose the most appropriate answer from the options given below:

Correct Answer: (c) Statement I is correct but Statement II is incorrect
Solution:

If H is a non-empty finite subset of a group G such that ab∈H for all a , b∈H, then H is also a group under the operation of G restricted to H. This is because H inherits associatively, identity and inverses from G, and closure under the group operation is given. So the statement (1) is correct. There does exist a homomorphism form (Z, +) to (Q, +).
One such homomorphism is the identity map, Which maps every integer in Z to the corresponding rationed number in Q. This map preserves addition, making it a homomorphism.

87. Given below are two statements:

Statement (I) : The friend function and the member functions of a friend class directly access the private and protected data.
Statement (II) : The friend function can access the private data through the member functions of the base class
In the light of the above statements, choose the most appropriate answer from the options given below:

Correct Answer: (a) Both Statement I and Statement II are correct
Solution:

The friend function and the member functions of a friend of class directly access the private and protected data. So the statement 1 is correct. The friend function can access the private data through the member function of the base class, So the statement II is also correct.

88. Given below are two statements:

Statement (I) : A thread is a dispatchable unit of work that does not executes sequentially and is not interruptible
Statement (II) : It is not possible to alter the behavior of a thread by altering its context when thread is suspended
In the light of the above statements, choose the most appropriate answer from the options given below:

Correct Answer: (b) Both Statement I and Statement II are incorrect
Solution:

A thread is a dispatchable unit of work that can execute concurrently with other threads, and it can be interrupted. so the statement I is incorrect I is incorrect.
The behavior of a thread can be altered by altering its context, especially when the thread is suspended and its execution is controlled by the programmer or the operating system. so the statement-II is also incorrect.

89. Given below are two statement :

Statement (I) : In Reuse Oriented Model, Modification of the old system parts appropriate to the new requirements.
Statement (II) : In Reuse Oriented Model, Integration of the modified parts are not possible into the new system.
In the light of the above statements, choose the most appropriate answer from the options given below:

Correct Answer: (c) Statement I is correct but Statement II is incorrect
Solution:

In the reuse Oriented Model. modification of old system parts is done to fit the new requirements, but the emphasis is on reusing existing components rather than modifying them extensively. The model focuses on identifying and reusing existing component framework, and system that can be integrated into the new system, reducing the need for expensive modification of existing components. So the statement (I) is correct and statement (II) is incorrect.

90. Given below are two statements:

Statement (I) : In datagram networks - routers hold state information about connections Statement (II) : In virtual circuit network - each virtual circuit requires router table space per connection
In the light of the above statements, choose the most appropriate answer from the options given below:

Correct Answer: (d) Statement I is incorrect but Statement II is correct
Solution:

In datagram networks, routes do not hold state information about connection because each packet is treated independently. so statement (I) is incorrect. However, in virtual circuit networks, each Virtual circuit does require routers need to maintain state information for each virtual circuit. So statement (II) is correct.