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

Total Questions: 100

1. What is the probability that a positive integer selected at random from the set of positive integer not exceeding 100 is divisible by either 2 or 5?

Correct Answer: (b) 3/5

2. Which of the following is not a palindromic subsequence of the string "ababcdabba"?

Correct Answer: (d) adba
Solution:

A palindromic subsequence is a sequence of characters within a larger sequence that reads the same backward as forward. Unlike a palindrome, which must be read in order, a palindromic subsequence can have characters in any order as long as they appear consecutively in the same order as in the original sequence. The given string is "ababcdabba". from this string 'adba' is not a palindromic subsequence.

3. Which of the following is TRUE?

Correct Answer: (a) The cost of searching an AVL tree is θ (log n) but that of binary search is 0(n)
Solution:

AVL tree is a balanced tree. AVL tree's time complexity of searching = θ (log n) But a binary search tree may be a skewed tree, so in the worst case Binary search tree searching time = O(n).

4. What is the result of evaluating the postfix expression "43*25*+b-"?

Correct Answer: (e) *
Solution:

The given postfix expression "43*25*+b–" is invalid so, UGC dropped this question

5. Which of the following circuit is used to store one bit of data?

Correct Answer: (c) Flip-Flop
Solution:

A flip-flop is a fundamental digital electronic component used in digital circuits to store binary data. It is capable of storing one bit of data, which can be either 0 or 1. Filp - flops are widely used in various digital systems such as computers, microcontrollers and communication devices to store and manipulate data.

6. Identify the code sequence : 1010 1011 1001 1000

Correct Answer: (c) Gray
Solution:

The Gray code is a sequence of binary number systems, which is also known as reflected
binary code. The reason for calling this code as reflected binary code is the first N/2 values compared with those of the last N/2 values in reverse order. In this code, two consecutive value are differed by one bit of binary digits.
The gray code is a very light weighted code because it doesn't depend on the value of the digit specified by the position. This code is also called a cyclic variable code as the transition of one value to its successive value carries a change of one bit only. Example-

7. The microoperation which divides a signed binary number by 2 is :

Correct Answer: (b) Logical shift
Solution:

Shift micro-operations are those microoperations that are used for the serial transfer of information.
A Logical shift is a bitwise operation where the bits in a binary number are shifted left or right by a certain number of position. In logical shift, the empty bit positions are filled with zeros.
(i) Logical left shift- One position moves each bit to the left one by one. The empty least significant bit (LSB) is filled with zero and the most significant bit (MSB) is rejected. Every time we shift a number to words the left by 1 bit it multiplies that number by 2.
(ii) Logical Right shift- Each bit move to the right one by one and the LSB is rejected and the empty. MSB is filled with zero. Every time we shift a number towards the right by 1 bit divides that number by 2.

8. A program that is used by other routines to accomplish a particular task, is called :

Correct Answer: (d) Subroutine
Solution:

A program that is used by other routine to accomplish a particular task, is called 'subroutine' or 'function'. A subroutine, also known as a method, procedure, is a set of instructions designed to perform a frequently used operation within a program. They can accept arguments, perform, Specific operations and often return a result.

9. Consider a triangle PQR with coordinates as P(0, 0), Q(2, 2) and R(10, 4). If this triangle is to be magnified to four times its size while keeping R(10, 4) fixed, then the coordinates of the magnified triangle are :

Correct Answer: (b) (-30, -12), Q(-22, -4) and R(10, 4)
Solution:

To magnify the triangle 4 times its size while keeping point R fixed at (10,4), we can use the following formula to final the coordinates of the other two points.
New coordinate = (old coordinate- fixed point) × magnification factor + fixed point
Let's calculate the new coordinates for points P and Q - for point P:
New P = (0.0 – (10, 4)) × 4 + (10,4)
= (–10, –4) × 4 + (10, 4)
= (–40, –16) + (10, 4)
= (–30, – 12)
For point Q: New Q = (2, 2 –(10, 4)) × 4 + (10, 4) =
(–8, -2) × 4 + (10, 4)
= (–32, –8) + (10, 4)
= (–22, – 4)
So, the coordinates of the magnified triangle are: P (– 30, –12), Q (–22, –4) and R (10, 4).

10. Which of the following statements is TRUE?

Correct Answer: (c) We can never build an object from a class containing a pure virtual function
Solution:

A pure virtual function is a function that is declared in a base class but does not have an implementation in that base class. Instead, it must be implemented in any non-abstract derived class, classes containing pure virtual function are considered abstract classes, and you cannot create objects directly from them. You need to derive build from them and implement the pure virtual functions to instantiate objects.