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.
Q101UGC NET Computer Science, December 2014 (Paper II & III, Selected Questions)
Which of the following algorithms is not a broadcast routing algorithm?
AFlooding
BMulti destination routing
CReverse path forwarding
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?
AB2B
BB2G
CC2C
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.
AEconomic Order Quantity
BInventory
CData Mining
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.
AFramework activities
BUmbrella activities
CPlanning activities
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?
ASimple and computable
BConsistent and objective
CConsistent in the use of units and dimensions
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?
AThe number of regions–1
BE – N + 1 , where E is the number of flow graph edges and N is the number of flow graph nodes
CP – 1, where P is the number of predicate nodes in the flow graph G.
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
APerformed
BManaged
CDefined
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.
ADesign
BArchitecture
CProcess
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?
AI and II
BIII and IV
CII and III
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 :
AMagnetic tapes → magnetic disks → optical disks → electronic disks → main memory → cache → registers
BMagnetic tapes → magnetic disks → electronic disks → optical disks → main memory → cache → registers
CMagnetic tapes → electronic disks → magnetic disks → optical disks → main memory → cache → registers
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 :
AInternal interrupts
BExternal interrupts
CSoftware interrupts
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
AΩ(n)
BΩ(lg n)
CΩ(n lg n)
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............
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 :
ACLIQUE ≤ₚ 3–CNF_SAT
BCLIQUE ≤ₚ VERTEX_COVER
CCLIQUE ≤ₚ SUBSET_SUM
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
ABoxing
BWrapping
CInstantiation
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
AS3 and S2 are true
BS3 and S1 are true
CS2 and S1 are true
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?
AAsynchronized methods
BSynchronized methods
CSerialized methods
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?
Astart ( )
Brun ( )
Cinit ( )
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:
AWrite-ahead log
BCheck-pointing
CLog buffer
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?
AWindows vista
BWindow 2000
CWindow NT
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 ?
AEvery binary relation is never be in BCNF
BEvery BCNF relation is in 3NF
C1 NF, 2 NF, 3 NF and BCNF are based on functional dependencies
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.
AStop-and-wait
BHDLC
CSliding window
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
AI and III
BII and IV
CI and IV
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 :
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______
AHalf toning
BDithering
CError diffusion
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?
AGraphical languages
BGeneral-purpose languages
CLinear-list notations
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
AL₁ is regular and L₂ is not regular
BL₁ is not regular and L₂ is regular
CL₁ is regular and L₂ is regular
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?
AS₁ only
BS₂ only
CS₁ and S₂
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.
AS = 1, C₀ = 0 and S = 0, C₀ = 1
BS = 0, C₀ = 0 and S = 1, C₀ = 1
CS = 1, C₀ = 1 and S = 0, C₀ = 1
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)
Aif (c ∧ b) → r and ¬b → ¬p, then (¬r ∧ p) → ¬c
Bif (c ∧ b) → r and ¬b → ¬p, then (r ∧ p) → c
Cif (c ∧ b) → r and ¬p → ¬b, then (¬r ∧ p) → ¬c
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
A(i) (ii) (iii) (iv)
B(ii) (iii) (i) (iv)
C(iii) (ii) (iv) (i)
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
A(1) only
B(3) only
C(1) and (2)
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)?
AMPI can run on any hardware platform
BThe programming model is a distributed memory model
CAll parallelism is implicit
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 :
AMacro processor
BMicro pre-processor
CMacro pre-processor
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 ..........
Adbefacg
Bdebfagc
Cdbefcga
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 :
ABreadth first search
BDepth first search
CRoot search
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:
ACounting micro seconds
BCounting number of key operations
CCounting number of statements
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
AThe item to be searched is in some where middle of the array
BThe item to be searched is not in the array
CThe item to be searched is in the last of the array
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?
ASelection sort
BBubble sort
CRadix sort
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 ..........
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 :
A0
B1
C2
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*/ }
AABCDEFGH1000
BCDEFGH1000
CDDEFGHH1000
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?
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?
AR(Pᵢ) ∩ W(Pⱼ) = Φ
BW(Pᵢ) ∩ R(Pⱼ) = Φ
CR(Pᵢ) ∩R(Pⱼ) = Φ
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 :
A1 / [(1 – P) + N.P]
B1 / [(N – 1)P + P]
C1 / [(1 – P) + P/N]
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?
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?
AFile descriptor table
BSystem call state
CScheduling parameters
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
A(1)
B(1) and (4)
C(1), (2) and (3)
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 :
ANeighbor Set
BStrong Entity Set
COwner Entity Set
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
A(1)
B(1), (2) and (3)
C(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.