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

Total Questions: 100

11. What is the output of the following program?

#include<stdio.h>
int main( )
{ int i = 3;
While (i – –)
{ int i = 10;
i – – ;
printf("%d", i);
}
printf("%d", i);
}

 

Correct Answer: (c) 999 – 1
Solution:

In this program, there are two variables named 'i'. One is declared in the outer scope of the 'main' function and initialized to 3. The other one is declared inside the while' loop and initialized to 10.
During the execution of the while loop, the inner 'i' (Initialized to 10) is decremented by 1 and printed 9, and then the loop condition is cheeked with the outer 'i'. This loop, continues until the outer 'i' because 0. After the loop the outer 'i' will be decremented one more time due to the post-decrement in the loop condition, So it will become–1. , the outer 'i' is printed outside the loop. So, the output of the program will be 999-1.

12. The Hue of a colour is related to its :

Correct Answer: (d) Wavelength
Solution:

The Hue refers to the attribute of a color that allows it to be classified as red, blue, green, etc., and it corresponds to the dominant wavelength of light that is perceived. Shorter wavelength are associated with cooler hues like blue and longer wavelengths with warmer hues like red. So, the hue of a colour is related to its wavelength.

13. "CREATE TABLE T" in SQL is an example of :

Correct Answer: (c) DDL
Solution:

SQL is a standard database language used to access and manipulate data in databases. SQL was developed by IBM computer scientists in the 1970s. There are several types of SQL statemants-
(i) Data Definition Language (DDL)
(ii) Data Manipulation Language (DML)
(iii) Data Query Language (DQL)
(iv) Data control Language (DCL)
(v) Transaction control Language (TCL)
In DDL, used to define, modify and delete database objects such as tables, indexes, and views. Examples include CREATE, ALTER, DROP
So, 'CREATE TABLE T' in SQL is an example of DDL.

14. An Address in main memory is called:

Correct Answer: (d) Physical address
Solution:

An address in main memory is called a location or physical address. The set of such locations is called the memory space, which consists of the actual main memory locations directly addressable for processing. As on example, consider a computer with main. memory capacity of 32M words. 25 bits are needed to specify a physical address in memory since 32M = 225.

15. A system bus in which each data item is transferred during a time slice known in advance to both units source and destination is called:

Correct Answer: (d) synchronous bus
Solution:

Data transfers over the system bus may be synchronous or asynchronous. In a synchronous bus, each data item is transferred during a time slice known in advance to both source and destination units.
Synchronization is achieved by driving both units from a common clock source. An alternative procedure is to have separate clocks of approximately the same frequency in each unit. Synchronization signals are transmitted periodically in order to keep all clocks in the system in step with each other.

16. What is the output of the following program?

# include <stdio .h>
# define SQR(x) (x*x)
int main ( )
{ int a, b = 3;
a = SQR (b + 2);
printf("%d", a);
return 0;
}

Correct Answer: (b) 11
Solution:

In this program, The macro 'SQR (x)' is defined as 'x * x'. In the ' main () function, 'b' is assigned the value 3. Then 'a' is assigned the result of 'SQR (b + 2)'.
So, 'a' becomes 'b + 2 * b + 2', which is
3 + 2 × 3 + 2
= 3 + 6 + 2 = 11
So, the output of the program will be 11.

17. The head of a moving head disk with 200 tracks, numbered 0 to 199, has just finished a request at track 125, and currently serving a request at track 143. The queue of requests is given in the FIFO order as 86, 147, 91, 177, 94, 150, 102, 175, 130. What will be the total number of head movements required to satisfy these requests for SCAN algorithm?

Correct Answer: (b) 169 cylinders
Solution:

Given the queue of requests in FIFO order: 86, 147, 91, 177, 94, 150, 102, 175, 130.
Sorted requests : 86, 91, 94, 102, 130, 147, 150, 175,  177.
Current nead position : 143
Now, applying the SCAN algorithm-
Total head movements = (147 – 143) + (150 – 147) +
(175 – 150) + (177 – 175) + (177 – 86) + (91-86)+ (94 –
91) + (102 – 94) + (130 – 102)
= 4 + 3 + 25 + 2 + 91 + 5 + 3 + 8 + 28
= 169 tracks
Therefore, the total number of head movements
required so satisfy these requests for the SCAN
algorithm with 169 cylinders is 169 tracks.

18. Given as 4 GB (≈ 4.3×10⁹ bytes) of virtual space and typical page size of 4 KB and each page table entry is 5 bytes. How many virtual pages world this imply? What is the size of whole page table?

Correct Answer: (e) *
Solution:

Given

19. In Linux, where is he user password stored?

Correct Answer: (c) / etc / passwd
Solution:

In Linux systems, user passwords are typically stored in the '/etc/ passwd' file. This file is readable by all users on the system. It stores encrypted passwords and other security - related information for user accounts.

20. Has functions are used to produce the message digests which are then encrypted with a private key to get:

Correct Answer: (b) Digital signature
Solution:

Hash functions are commonly used to produce message digests, which are then encrypted with a private key using a process called digital signing to create a digital signature. This ensures the integrity and authenticity of the message.