UGC NET CS Jul 2018
UGC NET JRF Computer Science · 2018 · with answers and explanations
- questions
- 10
- Total marks
- 20
- Duration
- 180 minutes
- Negative marking
- No
Subjects: Computer Science
Question 1
Computer Science · 2 marksAt a particular time of computation, the value of a counting semaphore is 10. Then 12 P operations and x V operations were performed on this semaphore. If the final value of semaphore is 7, x will be:
- B.9
- C.10
- D.11
- A.8
Correct answer: B
Explanation: Semaphore value: 10 - 12 + x = 7, so x = 9.
Question 2
Computer Science · 2 marksThe period of a signal is 100 ms. Its frequency is
- A.1003 Hertz
- B.10^-2 KHz
- C.10^-2 KHz
- D.10^5 Hertz
Correct answer: C
Explanation: Frequency = 1/period = 1/0.1s = 10 Hz = 0.01 KHz = 10^-2 KHz.
Question 3
Computer Science · 2 marksThe dotted-decimal notation of the following IPV4 address in binary notation is: 10000001 00001011 00001011 11101111
- C.129.11.11.239
- A.111.56.45.239
- B.129.11.10.238
- D.111.56.11.239
Correct answer: C
Explanation: 10000001=129, 00001011=11, 00001011=11, 11101111=239. So 129.11.11.239.
Question 4
Computer Science · 2 marksIn a paged memory, the page hit ratio is 0.40. The time required to access a page in secondary memory is equal to 120 ns. The time required to access a page in primary memory is 15 ns. The average time required to access a page is
- A.105 ns
- B.68 ns
- C.75 ns
- D.78 ns
Correct answer: D
Explanation: Average time = hit_ratio * primary_time + (1-hit_ratio) * secondary_time = 0.40*15 + 0.60*120 = 6 + 72 = 78 ns.
Question 5
Computer Science · 2 marksConsider a virtual page reference string 1, 2, 3, 2, 4, 2, 5, 2, 3, 4. Suppose LRU page replacement algorithm is implemented with 3 page frames in main memory. Then the number of page faults is
- A.5
- B.7
- C.9
- D.10
Correct answer: B
Explanation: Tracing LRU with 3 frames: faults at references 1,2,3,4,5,3,4 = 7 page faults.
Question 6
Computer Science · 2 marksPage information in memory is also called Page Table. The essential contents in each entry of a page table is/are
- B.Virtual Page number
- C.Page Frame number
- D.Both virtual page number and Page Frame Number
- A.Page Access information
Correct answer: D
Explanation: A page table entry essentially maps a virtual page number to a physical page frame number.
Question 7
Computer Science · 2 marksWhich of the following statements are true? (a) External Fragmentation exists when there is enough total memory space to satisfy a request but the available space is not contiguous. (b) Memory Fragmentation can be internal as well as external. (c) One solution to external Fragmentation is compaction.
- A.(a) and (b) only
- B.(a) and (c) only
- C.(b) and (c) only
- D.(a), (b) and (c)
Correct answer: C
Explanation: Statement (a) as written says space IS contiguous which is wrong (should be not contiguous). Statements (b) and (c) are correct.
Question 8
Computer Science · 2 marksConsider a Boolean function of n variables. The order of an algorithm that determines whether the Boolean function produces an output 1 is
- C.Quadratic
- A.Logarithmic
- B.Linear
- D.Exponential
Correct answer: D
Explanation: To determine satisfiability of a Boolean function of n variables requires checking up to 2^n assignments in the worst case (Boolean SAT is NP-complete).
Question 9
Computer Science · 2 marksIn C++, polymorphism requires:
- A.Inheritance only
- B.Virtual functions only
- C.References only
- D.Inheritance, Virtual functions and references (or pointers)
Correct answer: D
Explanation: Runtime polymorphism in C++ requires inheritance (base-derived relationship), virtual functions (dynamic dispatch), and base class pointers/references.
Question 10
Computer Science · 2 marksIf a function is friend of a class, which one of the following is wrong?
- A.A function can only be declared a friend by a class itself
- B.Friend functions are not members of a class, they are associated with it
- C.Friend functions are members of a class
- D.It can have access to all members of the class, even private ones
Correct answer: C
Explanation: Friend functions are NOT members of the class. They have access to private members but are declared outside the class scope.