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 marksTwo atomic operations permissible on Semaphores are _______ and _______.
- A.wait, stop
- D.wait, signal
- C.hold, signal
- 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 marksThe number of bits used for addressing in Gigabit Ethernet is
- D.128 bit
- C.64 bit
- B.48 bit
- A.32 bit
Correct answer: B
Explanation: All Ethernet variants, including Gigabit Ethernet, use 48-bit MAC addresses.
Question 3
Computer Science · 2 marksWhich device forwards data from one network device to destination based on MAC address?
- D.Gateway
- C.Switch
- B.Modem
- 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 marksThe expression *ptrdata++ is evaluated as (in C++):
- D.*(ptrdata++)
- C.*(ptrdata)++
- B.(*ptrdata)++
- 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 marksDisk head moves end-to-end serving requests, then returns to beginning without serving requests on return trip. Which algorithm is this?
- A.LOOK
- D.C-SCAN
- C.C-LOOK
- 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 marksn strings of length n are to be sorted lexicographically using merge-sort. The worst case running time is
- D.O(n^3)
- C.O(n^2 + log n)
- B.O(n^2 log n)
- 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 marksMember functions in C++ always access data in
- D.The private part of its class
- C.The public part of its class
- B.The object of which it is a member
- 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 marksWhich is incorrect regarding C++ virtual functions?
- D.Defined in base class
- C.Should be accessed using pointers
- B.Virtual function can be static
- 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.