UGC NET CS Nov 2017

UGC NET JRF Computer Science · 2017 · with answers and explanations

questions
8
Total marks
16
Duration
180 minutes
Negative marking
No

Subjects: Computer Science

Question 1

Computer Science · 2 marks

Two atomic operations permissible on Semaphores are _______ and _______.

  1. A.wait, stop
  2. D.wait, signal
  3. C.hold, signal
  4. B.wait, hold

Correct answer: D

Explanation: The two atomic operations on semaphores are wait (P operation, decrement) and signal (V operation, increment).

Question 2

Computer Science · 2 marks

The number of bits used for addressing in Gigabit Ethernet is

  1. D.128 bit
  2. C.64 bit
  3. B.48 bit
  4. A.32 bit

Correct answer: B

Explanation: All Ethernet variants, including Gigabit Ethernet, use 48-bit MAC addresses.

Question 3

Computer Science · 2 marks

Which device forwards data from one network device to destination based on MAC address?

  1. D.Gateway
  2. C.Switch
  3. B.Modem
  4. A.Hub

Correct answer: C

Explanation: A switch operates at the data link layer and forwards frames based on MAC addresses.

Question 4

Computer Science · 2 marks

The expression *ptrdata++ is evaluated as (in C++):

  1. D.*(ptrdata++)
  2. C.*(ptrdata)++
  3. B.(*ptrdata)++
  4. A.Depends on compiler

Correct answer: D

Explanation: In C++, postfix ++ has higher precedence than dereference *. So *ptrdata++ is parsed as *(ptrdata++): first increment the pointer, then dereference the old value.

Question 5

Computer Science · 2 marks

Disk head moves end-to-end serving requests, then returns to beginning without serving requests on return trip. Which algorithm is this?

  1. A.LOOK
  2. D.C-SCAN
  3. C.C-LOOK
  4. B.SCAN

Correct answer: D

Explanation: C-SCAN (Circular SCAN) moves the head in one direction serving requests, then returns to the beginning without serving, ensuring uniform wait times.

Question 6

Computer Science · 2 marks

n strings of length n are to be sorted lexicographically using merge-sort. The worst case running time is

  1. D.O(n^3)
  2. C.O(n^2 + log n)
  3. B.O(n^2 log n)
  4. A.O(n log n)

Correct answer: B

Explanation: Merge sort makes O(n log n) comparisons. Each string comparison takes O(n) time. Total: O(n * n log n) = O(n^2 log n).

Question 7

Computer Science · 2 marks

Member functions in C++ always access data in

  1. D.The private part of its class
  2. C.The public part of its class
  3. B.The object of which it is a member
  4. A.The class of which it is member

Correct answer: A

Explanation: Member functions have access to all data members (public, private, protected) of the class they belong to.

Question 8

Computer Science · 2 marks

Which is incorrect regarding C++ virtual functions?

  1. D.Defined in base class
  2. C.Should be accessed using pointers
  3. B.Virtual function can be static
  4. A.Must be declared in public section

Correct answer: B

Explanation: A virtual function cannot be static. Static functions are bound at compile time and do not support polymorphism.

View all papers — UGC NET JRF Computer Science

Practice this paper with a timer

Attempt it online, get scored instantly, and see which subjects are costing you marks.

Start practising free