UGC NET · Topic-wise previous year questions

Computer Science Previous Year Questions (page 3)

570 Computer Science questions asked in UGC NET previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.

  • 570 questions
  • 15 topics
  • Official answer key
  • Free

Practise by topic

Q101UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which of the following algorithms is not a broadcast routing algorithm?
  1. AFlooding
  2. BMulti destination routing
  3. CReverse path forwarding
  4. DAll of the above
Show answerHide answer

Correct answer: (D) All of the above

Explanation

Note: Flooding, multi-destination routing and reverse path forwarding are all broadcast routing algorithms, so none of them is 'not' a broadcast routing algorithm; the book keys (d). Flooding generates too many packets and consumes too much bandwidth but can be used for broadcasting. In multi-destination routing each packet contains a list of destinations, and reverse path forwarding approximates spanning-tree broadcast even when routers know nothing about the spanning tree.

Q102UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which e-business model allows consumers to name their own price for products and services?
  1. AB2B
  2. BB2G
  3. CC2C
  4. DC2B
Show answerHide answer

Correct answer: (D) C2B

Explanation

The C2B model, also called a reverse auction or demand collection model, enables buyers to name their own (often binding) price for a specific good or service. The website collects the bids and offers them to participating sellers. C2C is consumer to consumer, and B2B and B2G have nothing to do with consumer price setting.

Q103UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
_____ model is designed to bring prices down by increasing the number of customers who buy a particular product at once.
  1. AEconomic Order Quantity
  2. BInventory
  3. CData Mining
  4. DDemand-Sensitive Pricing
Show answerHide answer

Correct answer: (D) Demand-Sensitive Pricing

Explanation

Inventory and data mining have nothing to do with price. Economic Order Quantity (EOQ) is the order quantity that minimizes total holding and ordering costs. The demand-sensitive pricing model brings prices down as more customers buy the product at once.

Q104UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
_____are applied throughout the software process.
  1. AFramework activities
  2. BUmbrella activities
  3. CPlanning activities
  4. DConstruction activities
Show answerHide answer

Correct answer: (B) Umbrella activities

Explanation

The umbrella activities in a software development life cycle process include the following: software project management, formal technical reviews, software quality assurance and software configuration management. Umbrella activities occur throughout the software process and focus primarily on project management, tracking and control.

Q105UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which one of the following set of attributes should not be encompassed by effective software metrics?
  1. ASimple and computable
  2. BConsistent and objective
  3. CConsistent in the use of units and dimensions
  4. DProgramming language dependent
Show answerHide answer

Correct answer: (D) Programming language dependent

Explanation

Effective software metrics should be simple, computable, consistent, objective and consistent in the use of units and dimensions. They should not be programming language dependent, otherwise they cannot measure software consistently.

Q106UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which one of the following is used to compute cyclomatic complexity?
  1. AThe number of regions–1
  2. BE – N + 1 , where E is the number of flow graph edges and N is the number of flow graph nodes
  3. CP – 1, where P is the number of predicate nodes in the flow graph G.
  4. DP + 1, where P is the number of predicate nodes in the flow graph G.
Show answerHide answer

Correct answer: (D) P + 1, where P is the number of predicate nodes in the flow graph G.

Explanation

Cyclomatic complexity measures the logical complexity of a program (the number of independent paths). It can be computed as: (1) the number of regions of the flow graph; (2) V(G) = E – N + 2, where E is the number of edges and N the number of nodes; (3) V(G) = P + 1, where P is the number of predicate nodes in the flow graph G.

Q107UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Requirement Development, Organizational process focus, organizational training, risk management and integrated supplier management are process areas required to achieve maturity level
  1. APerformed
  2. BManaged
  3. CDefined
  4. DOptimized
Show answerHide answer

Correct answer: (C) Defined

Explanation

These process areas belong to maturity level 3 (Defined), which includes Requirements Development, Organizational Process Focus (OPF), Organizational Training (OT), Integrated Project Management (IPM) and Risk Management (RSKM).

Q108UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
The software _______ of a program of a computing system is the structure or structures of the system, which comprise software components, the externally visible properties of those components, and the relationships among them.
  1. ADesign
  2. BArchitecture
  3. CProcess
  4. DRequirement
Show answerHide answer

Correct answer: (B) Architecture

Explanation

Software architecture is the set of significant decisions about the organization of a software system: the structural elements and their interfaces, their behaviour and collaboration, and their composition into larger subsystems.

Q109UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
A computer based information system is needed : (I) as it is difficult for administrative staff to process data (II) due to rapid growth of information and communication technology (III) due to growing size of organizations which need to process large volume of data (IV) as timely and accurate decisions are to be taken Which of the above statement (s) is/are true?
  1. AI and II
  2. BIII and IV
  3. CII and III
  4. DII and IV
Show answerHide answer

Correct answer: (B) III and IV

Explanation

A computer based information system is needed because of the growing size of organizations which need to process large volumes of data, and such data must support timely and accurate decisions. So III and IV are true.

Q110UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Various storage devices used by an operating system can be arranged as follows in increasing order of accessing speed :
  1. AMagnetic tapes → magnetic disks → optical disks → electronic disks → main memory → cache → registers
  2. BMagnetic tapes → magnetic disks → electronic disks → optical disks → main memory → cache → registers
  3. CMagnetic tapes → electronic disks → magnetic disks → optical disks → main memory → cache → registers
  4. DMagnetic tapes → optical disks → magnetic disks → electronic disks → main memory → cache → registers
Show answerHide answer

Correct answer: (D) Magnetic tapes → optical disks → magnetic disks → electronic disks → main memory → cache → registers

Explanation

In increasing order of access speed: Magnetic tapes < Optical disks < Magnetic (hard) disks < Electronic disks (flash/SSD) < Main memory < Cache < Registers.

Q111UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
For switching from a CPU user mode to the supervisor mode following type of interrupt is most appropriate :
  1. AInternal interrupts
  2. BExternal interrupts
  3. CSoftware interrupts
  4. DNone of the above
Show answerHide answer

Correct answer: (C) Software interrupts

Explanation

Internal interrupts occur due to internal errors (like division by zero) and external interrupts come from hardware. Software interrupts are the most appropriate way to switch from user mode to supervisor (kernel) mode.

Q112UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Any decision tree that sorts n elements has height
  1. AΩ(n)
  2. BΩ(lg n)
  3. CΩ(n lg n)
  4. DΩ(n²)
Show answerHide answer

Correct answer: (C) Ω(n lg n)

Explanation

For any comparison-based sort the decision tree has at least n! leaves, so its height is at least lg(n!) = Ω(n lg n).

Q113UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Dijkstra algorithm, which solves the single-source shortest-paths problem, is a ................, and the Floyd-Warshall algorithm, which finds shortest paths between all pairs of vertices, is a............
  1. AGreedy algorithm, Divide-conquer algorithm
  2. BDivide-conquer algorithm, Greedy algorithm
  3. CGreedy algorithm, Dynamic programming algorithm
  4. DDynamic programming algorithm, Greedy algorithm
Show answerHide answer

Correct answer: (C) Greedy algorithm, Dynamic programming algorithm

Explanation

Dijkstra's algorithm for the single-source shortest-paths problem is a greedy algorithm, and the Floyd-Warshall algorithm for all-pairs shortest paths is a dynamic programming algorithm.

Q114UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
We can show that the clique problem is NP-hard by proving that :
  1. ACLIQUE ≤ₚ 3–CNF_SAT
  2. BCLIQUE ≤ₚ VERTEX_COVER
  3. CCLIQUE ≤ₚ SUBSET_SUM
  4. DNone of the above
Show answerHide answer

Correct answer: (D) None of the above

Explanation

To show CLIQUE is NP-hard, a known NP-complete problem must be reduced to CLIQUE (e.g. 3-CNF-SAT ≤ₚ CLIQUE), not the other way round. Reducing CLIQUE to 3-CNF-SAT, VERTEX_COVER or SUBSET_SUM only shows CLIQUE is no harder than them. So the answer is None of the above.

Q115UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Converting a primitive type data into its corresponding wrapper class object instance is called
  1. ABoxing
  2. BWrapping
  3. CInstantiation
  4. DAutoboxing
Show answerHide answer

Correct answer: (D) Autoboxing

Explanation

Autoboxing is the automatic conversion that the Java compiler makes from primitive types to their corresponding object wrapper classes.

Q116UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Consider the following statements S1, S2 and S3 : S1 : In call–by–value, anything that is passed into a function call is unchanged in the caller's scope when the function returns. S2 : In call-by-reference, a function receives implicit reference to a variable used as argument. S3 : In call-by-reference, caller is unable to see the modified variable used as argument
  1. AS3 and S2 are true
  2. BS3 and S1 are true
  3. CS2 and S1 are true
  4. DS1, S2, S3 are true
Show answerHide answer

Correct answer: (C) S2 and S1 are true

Explanation

S1 is true: in call-by-value, anything passed into a function is unchanged in the caller's scope when the function returns. S2 is true: in call-by-reference the function receives an implicit reference to the argument variable. S3 is false, because in call-by-reference the caller always sees the modified value of the argument.

Q117UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which methods are utilized to control the access to an object in multi-threaded programming?
  1. AAsynchronized methods
  2. BSynchronized methods
  3. CSerialized methods
  4. DNone of the above
Show answerHide answer

Correct answer: (B) Synchronized methods

Explanation

Synchronization is the capability to control the access of multiple threads to shared resources. Without it, one Java thread could modify a shared variable while another thread is using or updating the same variable; synchronized methods prevent this.

Q118UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which method is called first by an applet program?
  1. Astart ( )
  2. Brun ( )
  3. Cinit ( )
  4. Dbegin ( )
Show answerHide answer

Correct answer: (C) init ( )

Explanation

In the applet life cycle, init() is called first, followed by start(), paint(), stop() and destroy().

Q119UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
______rules used to limit the volume of log information that has to be handled and processed in the event of system failure involving the loss of volatile information:
  1. AWrite-ahead log
  2. BCheck-pointing
  3. CLog buffer
  4. DThomas
Show answerHide answer

Correct answer: (B) Check-pointing

Explanation

Check-pointing saves a snapshot of the system state periodically, so that after a failure recovery can restart from the last checkpoint; this limits the volume of log information that has to be processed.

Q120UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which of the following versions of window O.S. contain built-in partition manager which allows us to shrink and expand pre-defined drives?
  1. AWindows vista
  2. BWindow 2000
  3. CWindow NT
  4. DWindow 98
Show answerHide answer

Correct answer: (A) Windows vista

Explanation

Windows Vista's built-in disk management (Logical Disk Manager) supports shrinking and expanding volumes.

Q121UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which of the following is false ?
  1. AEvery binary relation is never be in BCNF
  2. BEvery BCNF relation is in 3NF
  3. C1 NF, 2 NF, 3 NF and BCNF are based on functional dependencies
  4. DMultivalued dependency (MVD) is a special case of join dependency (JD)
Show answerHide answer

Correct answer: (A) Every binary relation is never be in BCNF

Explanation

Every binary relation (a relation with only 2 attributes) is always in BCNF: if both attributes form the key it is in BCNF, and if one attribute is the key the other is determined by it. So statement (a) is false.

Q122UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
______ is a bit-oriented protocol for communication over point-to-point and multipoint links.
  1. AStop-and-wait
  2. BHDLC
  3. CSliding window
  4. DGo-back-N
Show answerHide answer

Correct answer: (B) HDLC

Explanation

HDLC (High-level Data Link Control) is a bit-oriented, code-transparent, synchronous data link layer protocol from ISO. It can be used for point-to-point and point-to-multipoint links.

Q123UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which of the following is correct? I. Two phase locking is an optimistic protocol II. Two phase locking is pessimistic protocol III. Time stamping is an optimistic protocol IV. Time stamping is pessimistic protocol
  1. AI and III
  2. BII and IV
  3. CI and IV
  4. DII and III
Show answerHide answer

Correct answer: (D) II and III

Explanation

Two phase locking is a pessimistic protocol (it assumes conflicts will happen) because it applies locks. Time stamping is an optimistic protocol because it uses no locking and handles conflicts later. So II and III are correct.

Q124UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
The behavior of the document elements in XML can be defined by :
  1. AUsing document object
  2. BRegistering appropriate event handlers
  3. CUsing element object
  4. DAll of the above
Show answerHide answer

Correct answer: (B) Registering appropriate event handlers

Explanation

A JavaScript program can define the behaviour of document elements by registering appropriate event handlers.

Q125UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
A technique used to approximate halftones without reducing spatial resolution is known as______
  1. AHalf toning
  2. BDithering
  3. CError diffusion
  4. DNone of the above
Show answerHide answer

Correct answer: (B) Dithering

Explanation

Dithering approximates halftones without reducing spatial resolution. The dither matrix is treated like a floor tile that is repeatedly positioned one copy next to another to cover the entire image.

Q126UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which of the following categories of language do not refer to animation language?
  1. AGraphical languages
  2. BGeneral-purpose languages
  3. CLinear-list notations
  4. DNone of the above
Show answerHide answer

Correct answer: (D) None of the above

Explanation

All three categories refer to animation languages: linear-list notations (e.g. 'B rotate palm'), general-purpose languages (e.g. ASAS), and graphical languages. So the answer is None of the above.

Q127UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Given two languages : L1 = {(ab)ⁿ aᵏ | n > k, k ≥ 0} L2 = {aⁿ bᵐ | n ≠ m} Using pumping lemma for regular language, it can be shown that
  1. AL₁ is regular and L₂ is not regular
  2. BL₁ is not regular and L₂ is regular
  3. CL₁ is regular and L₂ is regular
  4. DL₁ is not regular and L₂ is not regular
Show answerHide answer

Correct answer: (D) L₁ is not regular and L₂ is not regular

Explanation

The pumping lemma for regular languages can only be used to prove that a language is not regular. Both L₁ (which needs to compare n and k) and L₂ (which needs to compare n and m) require unbounded counting, so neither is regular.

Q128UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Consider the following statements : S₁: Boolean expressions and logic networks correspond to labeled acyclic digraphs. S₂: Optimal Boolean expressions may not correspond to simplest networks. S₃: Choosing essential blocks first in a Karnaugh map and then greedily choosing the largest remaining blocks to cover may not give an optimal expression. Which of these statement(s) is/are correct?
  1. AS₁ only
  2. BS₂ only
  3. CS₁ and S₂
  4. DS₁, S₂ and S₃
Show answerHide answer

Correct answer: (D) S₁, S₂ and S₃

Explanation

S₁: Boolean expressions and logic networks correspond to labeled acyclic digraphs. S₂: Minimal expressions do not always give the simplest network. S₃: Greedy K-map grouping may not give an optimal expression. So S₁, S₂ and S₃ are all correct.

Q129UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Consider a full-adder with the following input values : (a) x = 1, y = 0 and C₁ (carry input) = 0 (b) x = 0, y = 1 and C₁ = 1 Compute the values of S (sum) and C₀ (carry output) for the above input values.
  1. AS = 1, C₀ = 0 and S = 0, C₀ = 1
  2. BS = 0, C₀ = 0 and S = 1, C₀ = 1
  3. CS = 1, C₀ = 1 and S = 0, C₀ = 1
  4. DS = 0, C₀ = 1 and S = 1, C₀ = 0
Show answerHide answer

Correct answer: (A) S = 1, C₀ = 0 and S = 0, C₀ = 1

Explanation

For a full adder, S = A ⊕ B ⊕ Cᵢₙ and Cₒᵤₜ = A·B + Cᵢₙ·(A ⊕ B). (a) A = 1, B = 0, Cᵢₙ = 0: S = 1 ⊕ 0 ⊕ 0 = 1, Cₒᵤₜ = 1·0 + 0·(1 ⊕ 0) = 0. (b) A = 0, B = 1, Cᵢₙ = 1: S = 0 ⊕ 1 ⊕ 1 = 0, Cₒᵤₜ = 0·1 + 1·(0 ⊕ 1) = 1. So S = 1, C₀ = 0 and S = 0, C₀ = 1.

Q130UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
"If my computations are correct and I pay the electric bill, then I will run out of money. If I don't pay the electric bill, the power will be turned off. Therefore, if I don't run out of money and the power is still on, then my computations are incorrect." Convert this argument into logical notations using the variables c, b, r, p for propositions of computations, electric bills, out of money and the power respectively. (Where ¬ means NOT)
  1. Aif (c ∧ b) → r and ¬b → ¬p, then (¬r ∧ p) → ¬c
  2. Bif (c ∧ b) → r and ¬b → ¬p, then (r ∧ p) → c
  3. Cif (c ∧ b) → r and ¬p → ¬b, then (¬r ∧ p) → ¬c
  4. Dif (c ∨ b) → r and ¬b → ¬p, then (¬r ∧ p) → ¬c
Show answerHide answer

Correct answer: (A) if (c ∧ b) → r and ¬b → ¬p, then (¬r ∧ p) → ¬c

Explanation

S₁: (c ∧ b) → r S₂: ¬b → ¬p Conclusion: (¬r ∧ p) → ¬c So: if (c ∧ b) → r and ¬b → ¬p, then (¬r ∧ p) → ¬c.

Q131UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Match the following : List–I (a) (p→q) ⇔ (¬q→¬p) (b) [(p∧q)→r] ⇔ [p→(q→r)] (c) (p→q) ⇔ [(p∧¬q)→0] (d) (p↔q) ⇔ [(p→q) ∧ (q→p)] List–II (i) Contrapositive (ii) Exportation law (iii) Reductio ad absurdum (iv) Equivalence Codes : a b c d
  1. A(i) (ii) (iii) (iv)
  2. B(ii) (iii) (i) (iv)
  3. C(iii) (ii) (iv) (i)
  4. D(iv) (ii) (iii) (i)
Show answerHide answer

Correct answer: (A) (i) (ii) (iii) (iv)

Explanation

(a) Contrapositive: negate both hypothesis and conclusion and interchange them: (p → q) ⇔ (¬q → ¬p). (b) Exportation is a valid rule of replacement: ((p ∧ q) → r) ⇔ (p → (q → r)). (c) Reductio ad absurdum: (p → q) ⇔ [(p ∧ ¬q) → 0]. (d) Equivalence (biconditional): (p ↔ q) ⇔ (p → q) ∧ (q → p). So a-(i), b-(ii), c-(iii), d-(iv).

Q132UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Consider a proposition given as : "x ≥ 6, if x² ≥ 25" and its proof as : If x ≥ 6, then x² = x . x ≥ 6 . 6 = 36 ≥ 25 Which of the following is correct w.r.to the given proposition and its proof? (1) The proof shows the converse of what is to be proved (2) The proof starts by assuming what is to be shown (3) The proof is correct and there is nothing wrong
  1. A(1) only
  2. B(3) only
  3. C(1) and (2)
  4. D(2) only
Show answerHide answer

Correct answer: (C) (1) and (2)

Explanation

The proposition is "if x² ≥ 25 then x ≥ 6", but the proof assumes x ≥ 6 and derives x² ≥ 25. So the proof starts by assuming what is to be shown and actually proves the converse; the proof is not correct. Statements (1) and (2) are correct, statement (3) is not.

Q133UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Which of the following is not valid with reference to message passing interface (MPI)?
  1. AMPI can run on any hardware platform
  2. BThe programming model is a distributed memory model
  3. CAll parallelism is implicit
  4. DMPI - Comm. - size returns the total number of MPI processes in specified communication
Show answerHide answer

Correct answer: (C) All parallelism is implicit

Explanation

Message passing interface (MPI) is a standardized and portable message passing system. • It can run on any hardware platform. It is portable, efficient, flexible. • It has become a de facto standard for communication among memory system. • MPI – Comm. – Size returns the total number of MPI processes in specified communication. So answer is (c)

Q134UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
The translator which performs macro calls expansion is called :
  1. AMacro processor
  2. BMicro pre-processor
  3. CMacro pre-processor
  4. DDynamic Linker
Show answerHide answer

Correct answer: (C) Macro pre-processor

Explanation

Translator which performs macro calls expansion is called macro pre-processors

Q135UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
The in order and preorder Traversal of binary tree are dbeafcg and abdecfg respectively. The post-order Traversal is ..........
  1. Adbefacg
  2. Bdebfagc
  3. Cdbefcga
  4. Ddebfgca
Show answerHide answer

Correct answer: (D) debfgca

Explanation

Take the first node in preorder traversal a will be the root. Now we construct the binary tree Therefore, postorder is - debfgca

Q136UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Level order Traversal of a rooted Tree can be done by starting from root and performing :
  1. ABreadth first search
  2. BDepth first search
  3. CRoot search
  4. DDeep search
Show answerHide answer

Correct answer: (A) Breadth first search

Explanation

Level order traversal is similar to breadth first search, whereas preorder traversal is similar to depth first search. So the answer is (a).

Q137UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
To determine the efficiency of an algorithm the time factor is measured by:
  1. ACounting micro seconds
  2. BCounting number of key operations
  3. CCounting number of statements
  4. DCounting kilobytes of algorithm
Show answerHide answer

Correct answer: (B) Counting number of key operations

Explanation

The complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, where an elementary operation takes a fixed amount of time to perform. Thus the amount of time taken and the number of elementary operations performed by the algorithm differ by at most a constant factor.

Q138UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
The average case occurs in the Linear search Algorithm when
  1. AThe item to be searched is in some where middle of the array
  2. BThe item to be searched is not in the array
  3. CThe item to be searched is in the last of the array
  4. DThe item to be searcher is either in the last or not in the array
Show answerHide answer

Correct answer: (A) The item to be searched is in some where middle of the array

Explanation

Linear search runs in at worst linear time and make at most n comparisons, where n is the length of the list. If each element is equally likely to be searched then the linear search has an average case of (n/2) comparisons, but the average case can be affected if the search probability for each element vary.

Q139UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Which of the following algorithms sort n integers, having the range 0 to (n² – 1), in ascending order in O(n) time?
  1. ASelection sort
  2. BBubble sort
  3. CRadix sort
  4. DInsertion sort
Show answerHide answer

Correct answer: (C) Radix sort

Explanation

Radix sort because it sorts in integers in range 0 … (n² – 1) in O(n) time using base-n representation.

Q140UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Consider the given graph (edge : weight) : 1–6 : 10, 1–2 : 28, 2–7 : 14, 2–3 : 16, 6–5 : 25, 5–7 : 24, 7–4 : 18, 5–4 : 22, 4–3 : 12 Its Minimum cost spanning tree is ..........
  1. AEdges 1–2 (28), 2–3 (16), 3–4 (12), 4–5 (22), 5–6 (25), 6–7
  2. BEdges 1–6 (10), 6–5 (25), 5–4 (22), 4–3 (12), 3–2 (16), 2–7 (14)
  3. CEdges 1–2 (28), 2–3 (16), 3–4 (12), 4–5 (22), 5–6 (25), 5–7 (24)
  4. DEdges 1–6 (10), 1–2 (28), 2–3 (16), 3–4 (12), 4–7 (18), 4–5 (22)
Show answerHide answer

Correct answer: (B) Edges 1–6 (10), 6–5 (25), 5–4 (22), 4–3 (12), 3–2 (16), 2–7 (14)

Explanation

Using Kruskal's algorithm: take 10 (1–6), 12 (3–4), 14 (2–7), 16 (2–3); skip 18 (4–7, cycle); take 22 (4–5); skip 24 (5–7, cycle); take 25 (5–6). Total = 10 + 12 + 14 + 16 + 22 + 25 = 99, which is option (b).

Q141UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Given that x = 7.5, j = – 1.0, n = 1.0, m = 2.0 the value of --x + j == x > n >= m is :
  1. A0
  2. B1
  3. C2
  4. D3
Show answerHide answer

Correct answer: (A) 0

Explanation

Relational operators > and >= have higher precedence than ==, so the expression is (--x + j) == ((x > n) >= m). --x makes x = 6.5, so LHS = 6.5 + (–1.0) = 5.5. RHS: (6.5 > 1.0) = 1, then (1 >= 2.0) = 0. 5.5 == 0 is false, so the value is 0.

Q142UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
What is the output of the following program? (Assume that the appropriate directive are included and there is no syntax error) main () { char S[ ] = "ABCDEFGH", printf ("%C", * (&S[3])); printf ("%s", S + 4); printf ("%u", S); /* Base address of S is 1000*/ }
  1. AABCDEFGH1000
  2. BCDEFGH1000
  3. CDDEFGHH1000
  4. DDEFGH1000
Show answerHide answer

Correct answer: (D) DEFGH1000

Explanation

S occupies addresses 1000 to 1008: A B C D E F G H \0. S[3] is 'D', and *(&S[3]) is 'D' itself, so %c prints D. S + 4 skips 4 characters, so %s prints "EFGH". %u prints the base address of S, 1000. Final output: DEFGH1000.

Q143UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
A LRU page replacement is used with four page frames and eight pages. How many page faults will occur with the reference string 0172327103 if the four frames are initially empty?
  1. A6
  2. B7
  3. C5
  4. D8
Show answerHide answer

Correct answer: (B) 7

Explanation

Reference string 0 1 7 2 3 2 7 1 0 3 with 4 frames (LRU): 0, 1, 7, 2 are faults (4); 3 replaces 0 (5); 2, 7, 1 are hits; 0 replaces 3 (6); 3 replaces 2 (7). Total page faults = 7.

Q144UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Let Pᵢ and Pⱼ be two processes, R be the set of variables read from memory, and W be the set of variables written to memory. For the concurrent execution of two processes Pᵢ and Pⱼ which of the following conditions is not true?
  1. AR(Pᵢ) ∩ W(Pⱼ) = Φ
  2. BW(Pᵢ) ∩ R(Pⱼ) = Φ
  3. CR(Pᵢ) ∩R(Pⱼ) = Φ
  4. DW(Pᵢ) ∩W(Pⱼ) = Φ
Show answerHide answer

Correct answer: (C) R(Pᵢ) ∩R(Pⱼ) = Φ

Explanation

Reading of two process won't create any problem, So answer is (c)

Q145UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
In the case of parallelization, Amdahl's law states that if P is the proportion of a program that can be made parallel and (1–P) is the proportion that cannot be parallelized, then the maximum speed-up that can be achieved by using N processors is :
  1. A1 / [(1 – P) + N.P]
  2. B1 / [(N – 1)P + P]
  3. C1 / [(1 – P) + P/N]
  4. D1 / [P + (1 – P)/N]
Show answerHide answer

Correct answer: (C) 1 / [(1 – P) + P/N]

Explanation

By Amdahl's law, the serial part (1 – P) cannot be sped up while the parallel part P is divided among N processors, so the maximum speed-up is 1 / [(1 – P) + P/N].

Q146UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
A disk drive has 100 cylinders, numbered 0 to 99. Disk requests come to the disk driver for cylinders 12, 26, 24, 4, 42, 8 and 50 in that order. The driver is currently serving a request at cylinder 24. A seek takes 6 msec per cylinder moved. How much seek time is needed for shortest seek time first (SSTF) algorithm?
  1. A0.984 sec
  2. B0.396 sec
  3. C0.738 sec
  4. D0.42 sec
Show answerHide answer

Correct answer: (D) 0.42 sec

Explanation

SSTF from cylinder 24: 24 → 26 (2) → 12 (14) → 8 (4) → 4 (4) → 42 (38) → 50 (8). Total distance = 70 cylinders. Seek time = 70 × 6 msec = 420 msec = 0.42 sec.

Q147UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
The Unix Kernel maintains two key data structures related to processes, the process table and the user structure. Which of the following information is not the part of user structure?
  1. AFile descriptor table
  2. BSystem call state
  3. CScheduling parameters
  4. DKernel stack
Show answerHide answer

Correct answer: (C) Scheduling parameters

Explanation

The Unix Kernel maintains two key data structures related to processes, the process table and the user structure. In user structure there is no place for scheduling parameter process table store the information of all running process. The process table contains process ID's, memory usage of the process, what are file descriptor used in the process.

Q148UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Database applications were built directly on top of file system to overcome the following drawbacks of using file-systems : (1) Data redundancy and inconsistency (2) Difficulty in accessing Data (3) Data isolation (4) Integrity problems
  1. A(1)
  2. B(1) and (4)
  3. C(1), (2) and (3)
  4. D(1), (2), (3) and (4)
Show answerHide answer

Correct answer: (D) (1), (2), (3) and (4)

Explanation

Traditional file system has all mentioned drawbacks. Database applications built by using tables are used to overcome them. eg : Normalization and integrity constraints reduces redundancy & inconsistency. Select * from table provide easy access to data references, joins etc removes data is action primary & foreign key along with check predicates solves integrity problem

Q149UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
For a weak entity set to be meaningful, it must be associated with another entity set in combination with some of their attribute values, is called as :
  1. ANeighbor Set
  2. BStrong Entity Set
  3. COwner Entity Set
  4. DWeak Set
Show answerHide answer

Correct answer: (C) Owner Entity Set

Explanation

Every weak entity must be associated with an identifying entity i.e. the weak entity set is said to be existence dependent on the identifying set. The identifying entity set is said to own the weak entity set that it identifies. It is also called owner entity set.

Q150UGC NET Computer Science, June 2015 (Paper II & III, Selected Questions)
Drop Table cannot be used to drop a Table referenced by ______constraint. (1) Primary key (2) Sub key (3) Super key (4) Foreign key
  1. A(1)
  2. B(1), (2) and (3)
  3. C(4)
  4. D(1) and (4)
Show answerHide answer

Correct answer: (C) (4)

Explanation

If you drop child table first, the foreign key will be dropped as well. If you attempt to drop percent table first you will get an "could not drop object "a" because it is referenced by a foreign key constraint error, Drop table can not be used to drop a table reference by a foreign key constraint. The referencing foreign key constraint or the referencing table must be dropped.

How to use these UGC NET Computer Science questions

Every question here was asked in a real UGC NET paper; the paper and shift are shown on the card, and the number opens the question on its own page. Try each one before tapping Show answer, then attempt the full UGC NET papers as timed tests to check your speed under exam conditions.