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.
Q251UGC NET Computer Science, December 2015 (Paper II & III, Selected Questions)
In constraint satisfaction problem, constraints can be stated as ______
AArithmetic equations and inequalities that bind the values of variables
BArithmetic equations and inequalities that doesn't bind any restriction over variables
CArithmetic equations that impose restrictions over variables
DArithmetic equations that discard constraints over the given variables
Show answerHide answer
Correct answer: (A) Arithmetic equations and inequalities that bind the values of variables
Explanation
In a constraint satisfaction problem (e.g. the map colouring problem), constraints are expressed as arithmetic equations and inequalities that bind (restrict) the values of the variables. So option (a) is the proper choice.
Q252UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which of the following logic expressions is incorrect
A1 ⊕ 0 = 1
B1 ⊕ 1 ⊕ 1 = 1
C1 ⊕ 1 ⊕ 0 = 1
D1 ⊕ 1 = 0
Show answerHide answer
Correct answer: (C) 1 ⊕ 1 ⊕ 0 = 1
Explanation
With the EX-OR operation, an odd number of 1's returns 1 and an even number of 1's returns 0. XOR gives 1 only when the inputs are different (A ⊕ B = A'B + AB'). Here 1 ⊕ 1 ⊕ 0 has two 1's, so it equals 0, not 1. Therefore the incorrect expression is (c) 1 ⊕ 1 ⊕ 0 = 1.
Q253UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Simplified Boolean equation for the following truth table is:
x y z | F
0 0 0 | 0
0 0 1 | 1
0 1 0 | 0
0 1 1 | 1
1 0 0 | 1
1 0 1 | 0
1 1 0 | 1
1 1 1 | 0
Q255UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
A multiplexer combines four 100-Kbps channels using a time slot of 2 bits. What is the bit rate?
A100 kbps
B200 kbps
C400 kbps
D1000 kbps
Show answerHide answer
Correct answer: (C) 400 kbps
Explanation
bit rate = no. of channels × Input bit rate = 4 × 100 kbps = 400 kbps
Q256UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
In a positive-edge-triggered JK flip-flop, if J and K both are high then the output will be __________ on the rising edge of the clock.
ANo change
BSet
CReset
DToggle
Show answerHide answer
Correct answer: (D) Toggle
Explanation
Racing is problem of toggling more than once when the inputs are J = 1 and K = 1. The proper combination of propagation delay and edge triggering prevents the racing problem.
Q257UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
How many different equivalence relations with exactly three different equivalence classes are there on a set with five elements?
A10
B15
C25
D30
Show answerHide answer
Correct answer: (C) 25
Explanation
Equivalence relations on a set are in bijection with partitions of the set. A 5-element set split into 3 classes has partition types (1 + 1 + 3) or (1 + 2 + 2). For the first type, choose the triple: ⁵C₃ = 10. For the second type, choose the singleton (5 ways) and then pair the remaining 4 elements (3 ways): 5 × 3 = 15. Total = 10 + 15 = 25.
Q258UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Suppose that R₁ and R₂ are reflexive relations on a set A. Which of the following statements is correct?
AR₁ ∩ R₂ is reflexive and R₁ ∪ R₂ is irreflexive.
BR₁ ∩ R₂ is irreflexive and R₁ ∪ R₂ is reflexive.
CBoth R₁ ∩ R₂ and R₁∪ R₂ are reflexive.
DBoth R₁ ∩ R₂ and R₁ ∪ R₂ are irreflexive.
Show answerHide answer
Correct answer: (C) Both R₁ ∩ R₂ and R₁∪ R₂ are reflexive.
Explanation
If R₁ and R₂ are reflexive relations on a set A, then the diagonal Δ = {(a, a) : a ∈ A} is contained in both R₁ and R₂. R₁ ∪ R₂ is reflexive because Δ ⊆ R₁ ⊆ R₁ ∪ R₂. R₁ ∩ R₂ is also reflexive, because Δ ⊆ R₁ ∧ Δ ⊆ R₂ ⇒ Δ ⊆ R₁ ∩ R₂.
Q259UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
A clique in a simple undirected graph is a complete subgraph that is not contained in any larger complete subgraph. How many cliques are there in the graph shown below?
Vertices: a, b, c, d, e, f, g
Edges: a-b, b-c, a-d, d-e, e-f, c-f, b-e, a-g, b-g, d-g, e-g, b-f, c-e
(In the figure a, b, c are on the top row, d, e, f on the bottom row, g is where the diagonals a-e and b-d cross; the diagonals b-f and c-e cross without a vertex.)
A2
B4
C5
D6
Show answerHide answer
Correct answer: (C) 5
Explanation
A clique is a maximal complete subgraph (every vertex connected to all other vertices in the subgraph). Such subgraphs are: (i) {b, c, e, f} (ii) {a, d, g} (iii) {a, b, g} (iv) {b, e, g} (v) {d, e, g}. There are 5 cliques.
Q260UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Instruction pipelining is a technique that implements a form of parallelism called instruction level parallelism with a single processor. It therefore allows faster CPU throughput than would otherwise be possible at a given clock rate.
Q261UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which of the following is not an inherent application of stack?
AImplementation of recursion
BEvaluation of a postfix expression
CJob scheduling
DReverse a string
Show answerHide answer
Correct answer: (C) Job scheduling
Explanation
Application of stack(s) are: (i) Implementation of recursion. (ii) Evaluation of a postfix expression. (iii) Reverse a string. Job scheduling is commonly done via queue data structure.
Q262UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the following operations performed on a stack of size 5:
Push (a); Pop ( ); Push (b); Push (c); Pop ( ); Push (d); Pop ( ); Pop ( ); Push (e)
Which of the following statements is correct?
AUnderflow occurs
BStack operations are performed smoothly
COverflow occurs
DNone of the above
Show answerHide answer
Correct answer: (B) Stack operations are performed smoothly
Explanation
Since the given stack size is 5 and at most two elements are on the stack at any time, and no Pop is done on an empty stack, there is no overflow or underflow. The stack operations are performed smoothly.
Q263UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
In how many ways can the string
A ∩ B – A ∩ B – A
be fully parenthesized to yield an infix expression?
A15
B14
C13
D12
Show answerHide answer
Correct answer: (B) 14
Explanation
The number of ways to fully parenthesize an expression with n operators is the Catalan number C(n) = (1/(n + 1)) × ²ⁿCₙ. Here the number of operators is n = 4, so C(4) = (1/5) × ⁸C₄ = (1/5) × 8!/(4! 4!) = 70/5 = 14.
Note: All operators work as nodes of a binary tree.
Q264UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Suppose you are given a binary tree with n nodes, such that each node has exactly either zero or two children. The maximum height of the tree will be n − n + 1 1
An/2 – 1
Bn/2 + 1
C(n – 1)/2
D(n + 1)/2
Show answerHide answer
Correct answer: (C) (n – 1)/2
Explanation
In a full binary tree (each node has 0 or 2 children) with n nodes, the number of internal nodes is I = (n – 1)/2. When the tree is skewed (each internal node has one leaf child), every internal node adds one level, so the maximum height is also (n – 1)/2.
Q265UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the following binary search tree:
Root: 24
24 → left child 12, right child 26
12 → left child 11, right child 16
16 → left child 13
If we remove the root node, which of the node from the left subtree will be the new root?
A11
B12
C13
D16
Show answerHide answer
Correct answer: (D) 16
Explanation
If we delete the root node of a binary search tree, it can be replaced by its inorder successor or inorder predecessor. The inorder predecessor of 24 (largest node in the left subtree) is 16 and the inorder successor is 26. So, from the left subtree, 16 will be the new root.
Q266UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
The number of different spanning trees in complete graph, K₄ and bipartite graph, K₂,₂ have _________ and _________ respectively.
A14, 14
B16, 14
C16, 4
D14, 4
Show answerHide answer
Correct answer: (C) 16, 4
Explanation
The number of spanning trees in a complete graph with n vertices = nⁿ⁻² = 4⁴⁻² = 16.
A complete bipartite graph Kₘ,ₙ has mⁿ⁻¹ × nᵐ⁻¹ spanning trees = 2¹ × 2¹ = 4.
Q267UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Given i = 0, j = 1, k = –1, x = 0.5, y = 0.0
What is the output of the following expression in C language?
x * y < i + j || k
A-1
B0
C1
D2
Show answerHide answer
Correct answer: (C) 1
Explanation
Given i = 0, j = 1, k = –1, x = 0.5, y = 0.0.
x * y < i + j || k = (((x * y) < (i + j)) || k) = (((0.5 * 0.0) < (0 + 1)) || –1) = ((0 < 1) || –1) = 1
Q268UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
The following statement in 'C'
int (*f( ))[ ];
declares
Aa function returning a pointer to an array of integers.
Ba function returning an array of pointers to integers.
Carray of functions returning pointers to integers.
Dan illegal statement.
Show answerHide answer
Correct answer: (A) a function returning a pointer to an array of integers.
Explanation
In 'C', int (*f( ))[ ]; declares f as a function returning a pointer to an array of integers.
Q269UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
What is the value returned by the function f given below when n = 100?
int f(int n)
{ if (n == 0) then return n;
else
return n + f(n – 2);}
A2550
B2556
C5220
D5520
Show answerHide answer
Correct answer: (A) 2550
Explanation
The function is recursive and starts with n = 100. It keeps adding the present value to f(n – 2) and stops at n = 0, where it returns 0. So it computes 100 + 98 + ... + 2, an arithmetic series with 50 terms, first term 100 and last term 2.
Sum = (n/2)(a + l) = (50/2)(100 + 2) = 2550
Q270UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass ________ the method in the superclass.
AOverloads
BFriendships
CInherits
DOver rides
Show answerHide answer
Correct answer: (D) Over rides
Explanation
In a class hierarchy, when a method in a subclass has the name and type signatures as a method in its superclass, then the method in the subclass is said to over ride the method in the superclass.
Q271UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which one of the following is correct, when a class grants friend status to another class?
AThe member functions of the class generating friendship can access the members of the friend class.
BAll member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
CClass friendship is reciprocal to each other.
DThere is no such concept.
Show answerHide answer
Correct answer: (B) All member functions of the class granted friendship have unrestricted access to the members of the class granting the friendship.
Explanation
The member functions of a class which is given friend status by another class can access all private, protected and public members of the class granting friendship. Class friendship is neither reciprocal (commutative) nor transitive unless explicitly specified.
Q272UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
The extent to which a software tolerates the unexpected problems, is termed as:
AAccuracy
BReliability
CCorrectness
DRobustness
Show answerHide answer
Correct answer: (D) Robustness
Explanation
Robustness is the ability of a computer system to cope with errors during execution and cope with erroneous input. Correctness of an algorithm is asserted when it is said that the algorithm is correct with respect to a specification.
Q273UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which of the following is not typically a benefit of dynamic linking?
I. Reduction in overall program execution time.
II. Reduction in overall space consumption in memory.
III. Reduction in overall space consumption on disk.
IV. Reduction in the cost of software updates.
AI and II
BI only
CII and III
DIV only
Show answerHide answer
Correct answer: (B) I only
Explanation
(i) A dynamic linker is the part of an operating system that loads and links the shared libraries needed by an executable when it is executed (at “run time”), by copying the context of libraries from present storage to RAM, and filling jump tables and relocating pointers. (ii) Static linker has reduction in overall program execution time than dynamic linker.
Q274UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the reference string: 0 1 2 3 0 1 4 0 1 2 3 4 If FIFO page replacement algorithm is used, then the number of page faults with three page frames and four page frames are _______ and _______ respectively.
A10, 9
B9, 9
C10, 10
D9, 10
Show answerHide answer
Correct answer: (D) 9, 10
Explanation
Given reference string: 0, 1, 2, 3, 0, 1, 4, 0, 1, 2, 3, 4.
(i) FIFO with 3 page frames: faults occur at 0, 1, 2, 3, 0, 1, 4, 2, 3 (hits at the 2nd 0 and 1 after 4). Total page faults = 9.
(ii) FIFO with 4 page frames: faults occur at 0, 1, 2, 3, 4, 0, 1, 2, 3, 4 (hits at 0 and 1 before 4 is loaded). Total page faults = 10.
This is Belady's anomaly.
Q275UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
If the Disk head is located initially at track 32, find the number of disk moves required with FCFS scheduling criteria if the disk queue of I/O blocks requests are: 98, 37, 14, 124, 65, 67
A320
B322
C321
D319
Show answerHide answer
Correct answer: (C) 321
Explanation
Given I/O requests: 98, 37, 14, 124, 65, 67, head at 32. Using FCFS scheduling, total disk moves = (98 – 32) + (98 – 37) + (37 – 14) + (124 – 14) + (124 – 65) + (67 – 65) = 66 + 61 + 23 + 110 + 59 + 2 = 321
Q276UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
A scheduling Algorithm assigns priority proportional to the waiting time of a process. Every process starts with priority zero (lowest priority). The scheduler reevaluates the process priority for every 'T' time units and decides next process to be scheduled. If the process have no I/O operations and all arrive at time zero, then the scheduler implements _______ criteria.
APriority scheduling
BRound Robin Scheduling
CShortest Job First
DFCFS
Show answerHide answer
Correct answer: (B) Round Robin Scheduling
Explanation
The scheduling algorithm works as round robin with time quantum T. After a process has executed for T units, its waiting time becomes least (lowest priority), and its turn comes again only after every other process has had a chance for T units.
Q277UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Suppose there are four processes in execution with 12 instances of a Resource R in a system. The maximum need of each process and current allocation are given below:
Process | Max. Need | Current Allocation
P₁ | 8 | 3
P₂ | 9 | 4
P₃ | 5 | 2
P₄ | 3 | 1
With reference to current allocation, is system safe? If so, what is the safe sequence?
ANo
BYes, P₁ P₂ P₃ P₄
CYes, P₄ P₃ P₁ P₂
DYes, P₂ P₁ P₃ P₄
Show answerHide answer
Correct answer: (C) Yes, P₄ P₃ P₁ P₂
Explanation
Remaining need = Max need – Current allocation: P₁ = 5, P₂ = 5, P₃ = 3, P₄ = 2. Total allocated = 10, so available = 12 – 10 = 2.
Satisfy P₄ (need 2), it releases 3 → available 4. Satisfy P₃ (need 3), releases 5 → available 7 (after P₃ completes). Then P₁ and P₂ can be satisfied similarly. Hence the safe sequence is P₄, P₃, P₁, P₂.
Q278UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Given the following statements: S1: Strategic value of data mining is time stamping. S2: Information collection is an expensive process in building an expert system. Which of the following options is correct?
ABoth S1 and S2 are false.
BBoth S1 and S2 are true.
CS1 is true, S2 is false.
DS1 is false, S2 is true.
Show answerHide answer
Correct answer: (B) Both S1 and S2 are true.
Explanation
• Strategic value of data mining is time stamping → correct • Information collection is an expensive process in building an expert system → correct • An expert system is a computer system that emulates the decision making ability of a human expert.
Q279UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
In RDBMS, the constraint that no key attribute (column) may be NULL is referred to as:
AReferential integrity
BMulti-valued dependency
CEntity Integrity
DFunctional dependency
Show answerHide answer
Correct answer: (C) Entity Integrity
Explanation
The entity integrity constraint states that primary keys cannot be null. There must be a proper value in the primary key field. The basis of referential integrity is foreign keys. A foreign key in one table references a primary key in another table.
Q280UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
In a relational database model, NULL values can be used for all but which one of the following?
ATo allow duplicate tuples in the table by filling the primary key column(s) with NULL.
BTo avoid confusion with actual legitimate data values like 0 (zero) for integer columns and '' (the empty string) for string columns.
CTo leave columns in a tuple marked as "unknown" when the actual value is unknown.
DTo fill a column in a tuple when that column does not really "exist" for that particular tuple.
Show answerHide answer
Correct answer: (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.
Explanation
The SQL null is the term used to represent a missing value. A null value in a table is a value in a field that appears to be blank. A field with a null value is a field with no value.
Q281UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the following two commands C1 and C2 on the relation R from an SQL database:
C1: drop table R;
C2: delete from R;
Which of the following statements is TRUE?
I. Both C1 and C2 delete the schema for R.
II. C2 retains relation R, but deletes all tuples in R.
III. C1 deletes not only all tuples of R, but also the schema for R.
AI only
BI and II only
CII and III only
DI, II and III
Show answerHide answer
Correct answer: (C) II and III only
Explanation
Drop command remove all tuples of the relation as well as schema also. Delete command in SQL removes tuples from the relation but retain the schema of table in database.
Q282UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III, IV) for this table:
A | B | C | D
a₁ | b₁ | c₁ | d₁
a₂ | b₂ | c₃ | d₂
a₃ | b₃ | c₁ | d₃
I: {B} II: {B, C} III: {A, D} IV: {C, D}
If different symbols stand for different values in the table (e.g., d₁ is definitely not equal to d₂), then which of the above could not be the candidate key for the database table?
AI and III only
BIII and IV only
CII only
DI only
Show answerHide answer
Correct answer: (C) II only
Explanation
Attribute B has distinct values in all tuples, so {B} can be a candidate key, and {B, C} is then only a superkey (not minimal), because a candidate key is a minimal superkey. {A, D} and {C, D} have distinct values in all tuples, so both can be candidate keys. Hence only II could not be a candidate key.
Q283UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which of the following statement(s) is/are FALSE in the context of Relational DBMS?
I. Views in a database system are important because they help with access control by allowing users to see only a particular subset of the data in the database.
II. E-R diagrams are useful to logically model concepts.
III. An update anomaly is when it is not possible to store information unless some other, unrelated information is stored as well.
IV. SQL is a procedural language.
AI and IV only
BIII and IV only
CI, II and III only
DII, III and IV only
Show answerHide answer
Correct answer: (B) III and IV only
Explanation
(i) Views help provide data independence, allow the schema to change without recompiling existing applications, and help with access control by letting users see only a particular subset of the data. (ii) A conceptual ER model may be used as the foundation for logical data models. (iii) Being unable to store information unless other unrelated information is stored is an insertion anomaly, not an update anomaly. (iv) SQL is not a procedural language. Only statements III and IV are false.
Q284UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
The IEEE-754 double-precision format to represent floating point number, has a length of ________ bits.
A16
B32
C48
D64
Show answerHide answer
Correct answer: (D) 64
Explanation
Double precision floating point format occupies 8 bytes (64 bits) in computer memory: sign bit (1 bit), exponent (11 bits) and significand precision (53 bits, 52 explicitly stored).
Q285UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
In a fully-connected mesh network with 10 computers, total _______ number of cables are required and _______ number of ports are required for each device.
A40, 9
B45, 10
C45, 9
D50, 10
Show answerHide answer
Correct answer: (C) 45, 9
Explanation
Since, each in mesh network total number of cables are required ⁿC₂ = ¹⁰C₂ = 45 Each device needs to be connected to 9 other devices. So, each device needs to have 9 ports.
Q286UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Optical fiber uses reflection to guide light through a channel, in which angle of incidence is ________ the critical angle.
AEqual to
BLess than
CGreater than
DLess than or equal to
Show answerHide answer
Correct answer: (C) Greater than
Explanation
If the angle of incidence is equal to the critical angle, the light beam bends along the interface. When a beam of light travels through media of two different densities, if the angle of incidence is greater than the critical angle, reflection occurs.
Q287UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
If there are N people in the world and are using secret key encryption/decryption for privacy purpose, then number of secret keys required will be: (b) (N – 1)
AN
B(N – 1)
CN(N – 1)/2
DN(N + 1)/2
Show answerHide answer
Correct answer: (C) N(N – 1)/2
Explanation
Each pair of users must have a separate secret key. If N people want to use this method, the number of secret keys needed is ᴺC₂ = N(N – 1)/2.
Q288UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
The ______ model is preferred for software development when the requirements are not clear.
ARapid Application Development
BRational Unified Process
CEvolutionary Model
DWaterfall Model
Show answerHide answer
Correct answer: (C) Evolutionary Model
Explanation
Evolutionary Model is an iterative and incremental approach to software development. It is preferred for software development when requirements are not clear.
Q289UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which of the following is not included in waterfall model?
ARequirement analysis
BRisk analysis
CDesign
DCoding
Show answerHide answer
Correct answer: (B) Risk analysis
Explanation
The waterfall model is a sequential (non-iterative) process; it includes requirements, design, implementation, verification and maintenance. Risk analysis is used in the spiral model.
Q290UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
An attacker sits between customer and Banker, and captures the information from the customer and retransmits to the banker by altering the information. This attack is called as _______.
AMasquerade Attack
BReplay Attack
CPassive Attack
DDenial of Service Attack
Show answerHide answer
Correct answer: (B) Replay Attack
Explanation
(i) A replay attack (play back attack) is a form of network attack in which a valid data transmission is maliciously or fraudulently repeated or delayed. (ii) A masquerade attack is an attack that uses a fake identity. (iii) A passive attack is network attack in which a system is monitored and sometimes scanned for open ports and vulnerabilities. (iv) Denial of service attack, a type of attack on a network that is designed to bring the network to its knees by flooding it with useless traffic.
Q291UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Match the following:
A. Line coding
B. Block coding
C. Scrambling
D. Pulse code modulation
i. A technique to change analog signal to digital data
ii. Provides synchronization without increasing number of bits
iii. Process of converting digital data to digital signal
iv. Provides redundancy to ensure synchronization and inherits error detection
Code: A B C D
A(iv) (iii) (ii) (i)
B(iii) (iv) (ii) (i)
C(i) (iii) (ii) (iv)
D(ii) (i) (iv) (iii)
Show answerHide answer
Correct answer: (B) (iii) (iv) (ii) (i)
Explanation
(A) Line coding is the process of converting digital data into a digital signal – (iii). (B) Block coding provides redundancy to ensure synchronization and inherent error detection – (iv). (C) Scrambling provides synchronization without increasing the number of bits – (ii). (D) Pulse code modulation (PCM) is a technique to change an analog signal to digital data – (i).
Q292UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
In ........... method, the word is written to the block in both the cache and main memory, in parallel.
AWrite through
BWrite back
CWrite protected
DDirect mapping
Show answerHide answer
Correct answer: (A) Write through
Explanation
In write through method, data is written into the cache and the corresponding main memory location at the same time.
Q293UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
The .......... addressing mode is similar to register indirect addressing mode, except that an offset is added to the contents of the register. The offset and register are specified in the instruction.
ABase indexed
BBase indexed plus displacement
CIndexed
DDisplacement
Show answerHide answer
Correct answer: (D) Displacement
Explanation
The displacement addressing mode is similar to register indirect addressing mode, except that an offset is added to the contents of the register. The offset and register are specified in the instruction. Based Indexed Addressing: The operand’s offset is sum of the content of a base register BX or BP and an index register SI or DI. Based Indexed plus displacement addressing mode: In this mode of addressing the operand’s offset is given by offset=[BX or BP]+[SI or DI]+8 bit or 16 bit displacement. Indexed addressing mode: The operand’s offset is the sum of the content of an index register SI or DI and an 8 bit or 16 bit displacement. So, option (D) is correct.
Q294UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
A multi computer with 256 CPUs is organized as 16 × 16 grid. What is the worst case delay (in hops) that a message might have to take?
A16
B15
C32
D30
Show answerHide answer
Correct answer: (D) 30
Explanation
In a 16 × 16 grid, the worst case delay happens when a message travels between opposite corners (e.g. upper right to lower left). It passes through 2(N – 1) = 2(16 – 1) = 30 hops.
Q295UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Suppose that we have numbers between 1 and 1,000 in a binary search tree and want to search for the number 364. Which of the following sequences could not be the sequence of nodes examined?
In sequence (c), after visiting 912 (912 > 364) the search moves to the left subtree of 912, so every later node must be less than 912. 913 cannot appear after 912. So, the answer is (c).
Q296UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider the following game tree in which root is a maximizing node and children are visited left to right. What nodes will be pruned by the alpha-beta pruning?
A (MAX) has children B and C (MIN nodes).
B has leaf children D = 3, E = 12, F = 8.
C has leaf children G = 2, H = 15, I = 6.
AI
BHI
CCHI
DGHI
Show answerHide answer
Correct answer: (B) HI
Explanation
B is a MIN node: min(3, 12, 8) = 3, so A (MAX) gets α = 3. At C, the first leaf G = 2 gives C a value ≤ 2, which is less than α = 3. Whatever H and I produce, C cannot be chosen by A, so H and I are pruned. Option (b) is correct.
Q297UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Match the following:
A. Huffman codes
B. Optimal polygon triangulation
C. Activity selection problem
D. Quicksort
i. O(n²)
ii. θ(n³)
iii. O(nlogn)
iv. θ(n)
Code: A B C D
Q298UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Consider a source with symbols A, B, C, D with probabilities 1/2, 1/4, 1/8, and 1/8 respectively. What is the average number of bits per symbol for the Huffman code generated from above information?
A2 bits per symbol
B1.75 bits per symbol
C1.50 bits per symbol
D1.25 bits per symbol
Show answerHide answer
Correct answer: (B) 1.75 bits per symbol
Explanation
Huffman code lengths: A (1/2) → 1 bit, B (1/4) → 2 bits, C (1/8) → 3 bits, D (1/8) → 3 bits.
Average length = (1/2 × 1) + (1/4 × 2) + (1/8 × 3) + (1/8 × 3) = 14/8 = 1.75 bits per symbol.
Q299UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Which one of the following array represents a binary max-heap?
A[26, 13, 17, 14, 11, 9, 15]
B[26, 15, 14, 17, 11, 9, 13]
C[26, 15, 17, 14, 11, 9, 13]
D[26, 15, 13, 14, 11, 9, 17]
Show answerHide answer
Correct answer: (C) [26, 15, 17, 14, 11, 9, 13]
Explanation
Properties of Max Heap: Must be complete binary tree. All levels are completely filled except possibly the last level. The last level is filled from Left to Right. Each parent node has a value greater than or equal to its children. Option (a) Not fulfill the property of Max Heap. Option (b) Not fulfill the property of Max Heap. Option (c) Fulfill the property of Max Heap. Option (d) Not fulfill the property of Max Heap. So, the correct option is (c). (xii) Divide and Conquer
Q300UGC NET Computer Science, June 2016 (Paper II & III, Selected Questions)
Match the following types of variables with the corresponding programming language:
A. Static variables
B. Stack dynamic
C. Explicit heap dynamic
D. implicit heap dynamic
i. Local variables in Pascal
ii. All variables in APL
iii. Fortran 77
iv. All objects in JAVA
Code: A B C D
A(i) (iii) (iv) (ii)
B(iv) (i) (iii) (ii)
C(iii) (i) (iv) (ii)
D(ii) (i) (iii) (iv)
Show answerHide answer
Correct answer: (C) (iii) (i) (iv) (ii)
Explanation
FORTRAN I, II & IV contain only static variables. All objects in Java are explicit heap dynamic variable & are destroyed by "Garbage Collector" Languages Such as APL, ALGOL 68, & LISP Use implicit heap dynamic variables. So, a-iii, b-i, c-iv, d-ii Hence, correct option is (c).
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.