UGC NET · Topic-wise previous year questions

Computer Science Previous Year Questions (page 11)

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

Q501UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider the graph given below (edges with weights): A-C = 6, A-E = 4, A-D = 2, A-G = 3, C-G = 2, C-F = 5, C-B = 4, D-E = 5, D-G = 4, D-B = 4, G-B = 3, B-F = 4 Use Kruskal's algorithm to find a minimal spanning tree for the graph. The list of edges of the tree in the order in which they are choosen it?
  1. AAD, AE, AG, GC, GB, BF
  2. BGC, GB, BF, GA, AD, AE
  3. CGC, AD, GB, GA, BF, AE
  4. DAD, AG, GC, AE, GB, BF
Show answerHide answer

Correct answer: (C) GC, AD, GB, GA, BF, AE

Explanation

Kruskal's algorithm picks edges in increasing order of weight while avoiding cycles: GC = 2, AD = 2, GB = 3, GA = 3, then BF = 4 and AE = 4. So the order is GC, AD, GB, GA, BF, AE. Note: more than one order is possible since edge weights are repeated.

Q502UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Let G be an undirected connected graph with distinct edge weight. Let Eₘₐₓ be the edge with maximum weight and Eₘᵢₙ the edge with minimum weight. Which of the following statements is false?
  1. AEvery minimum spanning tree of G must contain Eₘᵢₙ
  2. BIf Eₘₐₓ is in minimum spanning tree, then its removal must disconnect G.
  3. CNo minimum spanning tree contains Eₘₐₓ
  4. DG has a unique minimum spanning tree
Show answerHide answer

Correct answer: (C) No minimum spanning tree contains Eₘₐₓ

Explanation

With distinct edge weights the MST is unique and always contains Eₘᵢₙ. Eₘₐₓ can be in the MST (when it is a bridge, its removal disconnects G), so the statement "No minimum spanning tree contains Eₘₐₓ" is false.

Q503UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In distributed system, the capacity of a system to adapt the increased service load is called_____
  1. ATolerance
  2. BScalability
  3. CCapability
  4. DLoading
Show answerHide answer

Correct answer: (B) Scalability

Explanation

Scalability is the ability of a process, network, software or organization to grow and manage increased demand. A scalable system can adapt to the changing needs of its users.

Q504UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In _____ disk scheduling algorithm, the disk head moves from one end to other end of the disk, serving the request along the way. When the head reaches the other end, it immediately returns to the beginning of the disk without serving any requests on the return trip.
  1. ALOOK
  2. BSCAN
  3. CC – LOOK
  4. Dc – SCAN
Show answerHide answer

Correct answer: (B) SCAN

Explanation

Note: returning to the beginning without serving requests on the return trip is the defining feature of C-SCAN (option d); the book keys (b). In the SCAN disk scheduling algorithm (as keyed by the book), the disk head moves from one end of the disk to the other, serving requests along the way, and then returns to the beginning without serving requests on the return trip.

Q505UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Suppose there are six files F1, F2, F3, F4, F5, F6 with corresponding sizes 150 KB, 225 KB, 75 KB, 60 KB, 275 KB and 65 KB respectively. The files are to be stored on a sequential device in such a way that optimizes access time. In what order should the files be stored?
  1. AF5, F2, F1, F3, F6, F4
  2. BF4, F6, F3, F1, F2, F5
  3. CF1, F2, F3, F4, F5, F6
  4. DF6, F5, F4, F3, F2, F1
Show answerHide answer

Correct answer: (B) F4, F6, F3, F1, F2, F5

Explanation

To minimise access time on a sequential device, store files in increasing order of size: F4 (60 KB), F6 (65 KB), F3 (75 KB), F1 (150 KB), F2 (225 KB), F5 (275 KB).

Q506UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which module gives control of the CPU to the process selected by the sort - term scheduler?
  1. ADispatcher
  2. BInterrupt
  3. CScheduler
  4. DThreading
Show answerHide answer

Correct answer: (A) Dispatcher

Explanation

The dispatcher is the module that gives control of the CPU to the process selected by the short-term scheduler.

Q507UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Two atomic operations permissible on Semaphores are _____ and _____
  1. AWait, stop
  2. BWait, hold
  3. CHold, signal
  4. DWait, signal
Show answerHide answer

Correct answer: (D) Wait, signal

Explanation

Wait & signal operations are the two atomic operations performed on a semaphore.

Q508UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In RDBMS, different classes or relations are created using ______ technique to prevent modification anomalies.
  1. AFunctional dependencies
  2. BData integrity
  3. CReferential integrity
  4. DNormal forms
Show answerHide answer

Correct answer: (D) Normal forms

Explanation

Relations are decomposed into normal forms (normalization) to prevent insertion, deletion and update anomalies.

Q509UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
______ SQL command changes one or more fields in a record.
  1. ALOOK-UP
  2. BINSERT
  3. CMODIFY
  4. DCHANGE
Show answerHide answer

Correct answer: (C) MODIFY

Explanation

As keyed by the book, MODIFY is the SQL command that changes one or more fields in a record.

Q510UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is/are true with reference to 'view' in DBMS? (A) A 'view' is a special stored procedure executed when certain event occurs (B) A 'view' is a virtual table, which occurs after executing a pre-complied query. Code :
  1. AOnly (A) is true
  2. BOnly (B) is true
  3. CBoth (A) and (B) are true
  4. DNeither (A) nor (B) are true
Show answerHide answer

Correct answer: (B) Only (B) is true

Explanation

A view is a virtual table through which a selective portion of the data from one or more tables can be seen; it does not contain data of its own. A stored procedure executed when an event occurs is a trigger, not a view. So only (B) is true.

Q511UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In SQL ______is an Aggregate function.
  1. ASELECT
  2. BCREATE
  3. CAVG
  4. DMODIFY
Show answerHide answer

Correct answer: (C) AVG

Explanation

AVG returns the average of the values in a group, ignoring null values. It is an aggregate function. Syntax: AVG([ALL | DISTINCT] expression).

Q512UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the following with respect to RDBMS : A. Entity integrity B. Domain integrity C. Referential integrity D. User defined integrity i. Enforces some specific business rule that to not fall into entity or domain ii. Rows can't be deleted which are used by other records iii. Enforces valid entries for a column iv. No duplicate rows in a table Code : A B C D
  1. Aiii iv i ii
  2. Biv iii ii i
  3. Civ ii iii i
  4. Dii iii iv i
Show answerHide answer

Correct answer: (B) iv iii ii i

Explanation

Entity integrity - no duplicate rows in a table (iv); Domain integrity - enforces valid entries for a column (iii); Referential integrity - rows can't be deleted which are used by other records (ii); User defined integrity - enforces specific business rules that do not fall into entity or domain integrity (i).

Q513UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
______ do not take their decisions on measurements or estimates of the current traffic and topology.
  1. AStatic algorithm
  2. BAdaptive algorithm
  3. CNon-adaptive algorithm
  4. DRecursive algorithm
Show answerHide answer

Correct answer: (C) Non-adaptive algorithm

Explanation

Non-adaptive (static) routing algorithms do not base their routing decisions on measurements or estimates of the current traffic and topology. Instead, the route from one node to another is computed in advance.

Q514UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following layer of OSI Reference model is also called End-to-End layer?
  1. ANetwork layer
  2. BDatalink layer
  3. CSession layer
  4. DTransport layer
Show answerHide answer

Correct answer: (D) Transport layer

Explanation

The transport layer is responsible for end-to-end communication over a network; it provides logical communication between application processes running on different hosts.

Q515UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following devices takes data sent from one network device and forwards it to the destination node based on MAC address?
  1. AHub
  2. BModem
  3. CSwitch
  4. DGateway
Show answerHide answer

Correct answer: (C) Switch

Explanation

Switch takes data sent from one network device & forwards it to the destination node based on MAC address. A switch is a multi port bridge with a buffer and a design that can boost its efficiency and performance. Switch is data link layer device. It can perform error checking before forwarding data.

Q516UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The number of bits used for addressing in Gigabit Ethernet is ______
  1. A32 bits
  2. B48 bits
  3. C64 bits
  4. D128 bits
Show answerHide answer

Correct answer: (B) 48 bits

Explanation

Gigabit Ethernet uses the standard Ethernet frame, whose destination and source address (MAC address) fields are each 48 bits long.

Q517UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The IP address ______ is used by hosts when they are being booted.
  1. A0.0.0.0
  2. B1.0.0.0
  3. C1.1.1.1
  4. D255.255.255.255
Show answerHide answer

Correct answer: (A) 0.0.0.0

Explanation

The address 0.0.0.0 is used by a host as its source address while it is booting (e.g. in a DHCP request) before it knows its own IP address.

Q518UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Software not wear-out in the traditional sense of the term, but software does tend to deteriorate as it evolves, because :
  1. ASoftware suffers from exposure to hostile environments
  2. BDefects are more likely to arise after software has been used often
  3. CMultiple change requests introduce errors in component interactions
  4. DSoftware spare parts become harder to order
Show answerHide answer

Correct answer: (C) Multiple change requests introduce errors in component interactions

Explanation

As software is used, it receives multiple change requests; each change can introduce errors in component interactions, so the software deteriorates over time.

Q519UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Software re-engineering is concerned with :
  1. ARe-constructing the original source code from the existing machine (low - level) code program and modifying it to make it more user - friendly
  2. BScrapping the source code of a software and re-writing it entirely from scratch
  3. CRe-organizing and modifying existing software systems to make then more maintainable
  4. DTranslating source code of an existing software to a new machine (low - level) language
Show answerHide answer

Correct answer: (C) Re-organizing and modifying existing software systems to make then more maintainable

Explanation

Software re-engineering is a process of software development which is done to improve the maintainability of a software system.

Q520UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not a key issue stressed by an agile philosophy of software engineering?
  1. AThe importance of self-organizing teams as well as communication and collaboration between team members and customers
  2. BRecognition that change represents opportunity
  3. CEmphasis on rapid delivery of software that satisfies the customer
  4. DHaving a separate testing phase after a build phase
Show answerHide answer

Correct answer: (D) Having a separate testing phase after a build phase

Explanation

Agile philosophy stresses self-organizing teams, collaboration with customers, welcoming change and rapid delivery of working software. Testing is done continuously along with development, not as a separate phase after the build phase.

Q521UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
What is the normal order of activities in which traditional software testing is organized ? (A) Integration Testing (B) System testing (C) Unit Testing (D) Validation Testing Code :
  1. A(C), (A), (B), (D)
  2. B(C), (A), (D), (B)
  3. C(D), (C), (B), (A)
  4. D(B), (D), (A), (C)
Show answerHide answer

Correct answer: (A) (C), (A), (B), (D)

Explanation

Traditional testing starts with unit testing, followed by integration testing, then system testing and finally validation (acceptance) testing: (C), (A), (B), (D).

Q522UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following testing techniques ensures that the software product runs correctly after the changes during maintenance?
  1. APath Testing
  2. BIntegration Testing
  3. CUnit Testing
  4. DRegression Testing
Show answerHide answer

Correct answer: (D) Regression Testing

Explanation

Regression testing verifies that previously developed and tested software still performs correctly after it has been changed, e.g. after enhancements or patches during maintenance.

Q523UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not correct for virtual function in C++?
  1. AMust be declared in public section of class
  2. BVirtual function can be static
  3. CVirtual function should be accessed using pointers
  4. DVirtual function is defined in base class
Show answerHide answer

Correct answer: (B) Virtual function can be static

Explanation

A virtual function cannot be static, because a virtual function is a non-static member function whose call is resolved through a specific object at run time.

Q524UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not correct (in C++)?
  1. AClass templates and function templates are instantiated in the same way
  2. BClass templates differ from function templates in the way they are initiated
  3. CClass template is initiated by defining an object using the template argument
  4. DClass templates are generally used for storage classes
Show answerHide answer

Correct answer: (A) Class templates and function templates are instantiated in the same way

Explanation

Function templates are instantiated implicitly when the function is called with arguments, whereas class templates are instantiated by defining an object with explicit template arguments. So class templates and function templates are not instantiated in the same way; statement (a) is not correct.

Q525UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The associativity of which of the following operators is left to right, in C++?
  1. AUnary Operator
  2. BLogical not
  3. CArray element access
  4. DAddress of
Show answerHide answer

Correct answer: (C) Array element access

Explanation

Only array element access ([]) is left-to-right associative among the options listed. All others are unary operators and are right-to-left associative.

Q526UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
A member function can always access the data in ______ , (in C++)
  1. Athe class of which it is member
  2. Bthe object of which it is a member
  3. Cthe public part of its class
  4. Dthe private part of its class
Show answerHide answer

Correct answer: (A) the class of which it is member

Explanation

A member function can always access all the data (public, private and protected) of the class of which it is a member.

Q527UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
'ptrdata' is a pointer to a data type. The expression *ptrdata++ is evaluated as (in C++):
  1. A*(ptrdata++)
  2. B(*ptrdata)++
  3. C*(ptrdata)++
  4. DDepends on compiler
Show answerHide answer

Correct answer: (A) *(ptrdata++)

Explanation

Postfix ++ has higher precedence than *, so *ptrdata++ is evaluated as *(ptrdata++): the value at ptrdata is used and then the pointer moves to the next location. (*ptrdata)++ would instead increment the value stored at that location.

Q528UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the given wireless technologies used in IoT, consumes the least amount of power?
  1. AZigbee
  2. BBluetooth
  3. CWi-Fi
  4. DGSM/CDMA
Show answerHide answer

Correct answer: (B) Bluetooth

Explanation

As keyed by the book, Bluetooth (in its low-energy form) consumes the least power among the options; Wi-Fi and GSM/CDMA consume much more.

Q529UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the description of several parts of a classic optimizing compiler in List-I, with the names of those parts in List - II : List-I A. A part of a compiler that is responsible for recognizing syntax B. A part of a complier that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories C. A part of a compiler that understand the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions. D. An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate Representation) List-II i. Optimizer ii. Semantic Analysis iii. Parser iv. Scanner Code : A B C D
  1. Aiii iv ii i
  2. Biv iii ii i
  3. Cii iv i iii
  4. Dii iv iii i
Show answerHide answer

Correct answer: (A) iii iv ii i

Explanation

The parser (syntax analyzer) recognizes syntax (A-iii); the scanner (lexical analyzer) turns the character stream into words/tokens (B-iv); the semantic analyzer checks meanings and consistent use of names (C-ii); the optimizer is an IR-to-IR transformer that improves the IR program (D-i).

Q530UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following Super Computers in the fastest Super Computer?
  1. ASun-way Taihu Light
  2. BTitan
  3. CPiz Daint
  4. DSequoria
Show answerHide answer

Correct answer: (A) Sun-way Taihu Light

Explanation

Sunway TaihuLight was named the world's fastest supercomputer in the TOP500 list at that time. It was developed by China's National Research Center of Parallel Computer Engineering & Technology (NRCPC).

Q531UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following statements about ERP system is true?
  1. AMost ERP software implementations fully achieve seamless integration.
  2. BERP software package are themselves combinations of separate applications for manufacturing, materials, resource planning, general ledger, human resources, procurement and order entry
  3. CIntegration of ERP systems can be achieved in only one way
  4. DAn ERP package implemented uniformly throughout an enterprise is likely to contain very flexible connections to allow charges and software variations.
Show answerHide answer

Correct answer: (B) ERP software package are themselves combinations of separate applications for manufacturing, materials, resource planning, general ledger, human resources, procurement and order entry

Explanation

ERP software packages are themselves combinations of separate applications for manufacturing, materials resource planning, general ledger, human resources, procurement and order entry.

Q532UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is not a clustering method?
  1. AK–Mean method
  2. BSelf Organizing feature map method
  3. CK – nearest neighbor method
  4. DAgglomerative method
Show answerHide answer

Correct answer: (C) K – nearest neighbor method

Explanation

K-means, self-organizing feature maps and agglomerative methods are clustering methods. The k-nearest neighbour (K-NN) algorithm is a non-parametric method used for classification and regression, not clustering.

Q533UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following regular expressions, each describing a language of binary numbers (MSB to LSB) that represents non-negative decimal values, does not include even values? Where {+, *} are quantification characters.
  1. A0*1+0*1*
  2. B0*10+1*
  3. C0*1*0*1+
  4. D0*1*0*1*
Show answerHide answer

Correct answer: (C) 0*1*0*1+

Explanation

Odd binary numbers end with 1 in the LSB and even numbers end with 0. Only 0*1*0*1+ always ends with at least one 1, so its language contains no even values.

Q534UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
A micro-instruction format has micro-ops field which is divided into three subfields F1, F2, F3 each having seven distinct micro-operations, condition field CD for four status bits, branch field BR having four options used in conjunction with address field ADF. The address space is of 128 memory locations. The size of micro-instruction is :
  1. A17 bits
  2. B20 bits
  3. C24 bits
  4. D32 bits
Show answerHide answer

Correct answer: (B) 20 bits

Explanation

F1, F2, F3 each with 7 micro-operations need 3 bits each = 9 bits; CD for 4 status bits needs 2 bits; BR with 4 options needs 2 bits; ADF for 128 locations needs 7 bits. Total = 9 + 2 + 2 + 7 = 20 bits.

Q535UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following is correct statement?
  1. AIn memory-mapped I/O, the CPU can manipulate I/O data residing in interface registers that are not used to manipulate memory words
  2. BThe isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment
  3. CIn asynchronous serial transmission of data the two units share a common clock
  4. DIn synchronous serial transmission of data two units have different clocks
Show answerHide answer

Correct answer: (B) The isolated I/O method isolates memory and I/O addresses so that memory address range is not affected by interface address assignment

Explanation

The isolated I/O method isolates memory and I/O addresses so that the memory address range is not affected by interface address assignment. Memory-mapped I/O uses the same address space for memory and I/O devices. In asynchronous serial transfer the two units do not share a common clock; in synchronous serial transfer they do.

Q536UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In 8085 microprocessor which of the following flag(s) is (are) affected by an arithmetic operation?
  1. AAC flag only
  2. BCY flag only
  3. CZ flag only
  4. DAC, CY, Z flags
Show answerHide answer

Correct answer: (D) AC, CY, Z flags

Explanation

AC is the auxiliary carry flag, CY is the carry flag and Z is the zero flag. All these flags are affected by arithmetic operations.

Q537UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In 8085 microprocessor the address bus is of .......... bits
  1. A4
  2. B8
  3. C16
  4. D32
Show answerHide answer

Correct answer: (C) 16

Explanation

The 8085 microprocessor has a 16-bit address bus, so 2¹⁶ = 65,536 different memory locations can be addressed.

Q538UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
In the architecture of 8085 microprocessor match the following : A. Processing unit B. Instruction unit C. Storage and Interface unit i. Interrupt ii. General purpose Register iii. ALU iv. Timing and control Code : A B C
  1. Aiv i ii
  2. Biii iv ii
  3. Cii iii i
  4. Di ii iv
Show answerHide answer

Correct answer: (B) iii iv ii

Explanation

The ALU forms the processing unit (A-iii); timing and control belongs to the instruction unit (B-iv); the general-purpose registers are in the storage and interface unit (C-ii).

Q539UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Which of the following addressing mode is best suited to access elements of an array of contiguous memory locations?
  1. AIndexed addressing mode
  2. BBase Register addressing mode
  3. CRelative address mode
  4. DDisplacement mode
Show answerHide answer

Correct answer: (A) Indexed addressing mode

Explanation

Indexed addressing mode is best suited for accessing an array in contiguous memory location.

Q540UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider a full binary tree with n internal nodes, internal path length i, and external path length e. The internal path length of a full binary tree is the sum, taken over all nodes of the tree, of the depth of each node. Similarly, the external path length is the sum, taken over all leaves of the tree, of the depth of each leaf. Which of the following is correct for the full binary tree?
  1. Ae = i + n
  2. Be = i + 2n
  3. Ce = 2i + n
  4. De = 2ⁿ + i
Show answerHide answer

Correct answer: (B) e = i + 2n

Explanation

For a full binary tree with n internal nodes, e = i + 2n. Example: a full binary tree with 7 internal nodes of depth up to 2 has i = 0 + 1×2 + 2×4 = 10 and 8 leaves at depth 3, so e = 24 = 10 + 2×7.

Q541UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Standard planning algorithms assume environment to be...............
  1. ABoth deterministic and fully observable
  2. BNeither deterministic nor fully observable
  3. CDeterministic but not fully observable
  4. DNot deterministic but fully observable
Show answerHide answer

Correct answer: (A) Both deterministic and fully observable

Explanation

Standard planning algorithms assume the environment to be both deterministic and fully observable.

Q542UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
If b is the branding factor and m is the maximum depth of the search tree, what is the space complexity of greedy search?
  1. AO(b + m)
  2. BO(bm)
  3. CO(bᵐ)
  4. DO(mᵇ)
Show answerHide answer

Correct answer: (C) O(bᵐ)

Explanation

In the worst case greedy (best-first) search keeps all generated nodes in memory. With branching factor b and maximum depth m, the space complexity is O(bᵐ).

Q543UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Heap allocation is required for languages that :
  1. Ause dynamic scope rules
  2. Bsupport dynamic data structures
  3. Csupport recursion
  4. Dsupport recursion and dynamic data structures
Show answerHide answer

Correct answer: (B) support dynamic data structures

Explanation

Heap allocation is required for languages that support dynamic data structures, whose storage is allocated and freed at run time in an arbitrary order.

Q544UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Find the equation of the circle x² + y² = 1 in terms of x'y' coordinates, assuming that the xy coordinate system results from a scaling of 3 units in the x' direction and 4 units in the y' direction.
  1. A3(x')² + 4(y')² = 1
  2. B(x'/3)² + (y'/4)² = 1
  3. C(3x')² + (4y')² = 1
  4. D(1/3)(x')² + (1/4)(y')² = 1
Show answerHide answer

Correct answer: (B) (x'/3)² + (y'/4)² = 1

Explanation

Scaling by 3 units in x' and 4 units in y' gives x = x'/3 and y = y'/4. Substituting in x² + y² = 1 gives (x'/3)² + (y'/4)² = 1.

Q545UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Find the normalization transformation that maps a window whose lower left corner is at (1, 1) and upper right corner is at (3, 5) onto a view port that is the entire normalized device screen
  1. A[1/2 0 −1/2] [0 1/4 −1/4] [0 0 1]
  2. B[1/2 0 1/2] [0 −1/4 1/4] [1 1 1]
  3. C[1/2 0 −1/2] [0 1/4 1/4] [1 0 0]
  4. D[1/2 0 1/2] [0 1/4 −1/4] [1 0 0]
Show answerHide answer

Correct answer: (A) [1/2 0 −1/2] [0 1/4 −1/4] [0 0 1]

Explanation

Window: xwmin = 1, ywmin = 1, xwmax = 3, ywmax = 5. Viewport (normalized screen): xvmin = 0, yvmin = 0, xvmax = 1, yvmax = 1. Scale factors sx = (1 − 0)/(3 − 1) = 1/2 and sy = (1 − 0)/(5 − 1) = 1/4. N = T(xvmin, yvmin) · S(sx, sy) · T(−xwmin, −ywmin), which gives the matrix [1/2 0 −1/2], [0 1/4 −1/4], [0 0 1].

Q546UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
The Bounded buffer problem is also known as_____
  1. AProducer - consumer problem
  2. BReader - writer problem
  3. CDining philosophers problem
  4. DBoth (a) and (b)
Show answerHide answer

Correct answer: (A) Producer - consumer problem

Explanation

The producer-consumer (bounded buffer) problem describes two processes, the producer and the consumer, which share a common fixed-size buffer used as a queue. The producer puts items into the buffer and waits if it is full; the consumer removes items and waits if it is empty.

Q547UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
User level threads are threads that are visible to the programmer and are unknown to the kernel. The operating system kernel supports and manages kernel level threads. Three different types of models relate user and kernel level threads. Which of the following statements is/are true? (A) (i) The many to one model maps many user threads to one kernel thread (ii) The one - to - one model maps one user threads to one kernel thread (iii) The many model maps many user threads to smaller or equal kernel threads (B) (i) Many - to- one model maps many kernel threads to one user thread (ii) One - to - one model maps one kernel thread to one user thread (iii) Many - to - many model maps many kernel threads to smaller or equal user threads Code :
  1. A(A) is true; (B) is false
  2. B(A) is false; (B) is true
  3. CBoth (A) and (B) are true
  4. DBoth (A) and (B) are false
Show answerHide answer

Correct answer: (A) (A) is true; (B) is false

Explanation

In statement set (A), the many-to-one model maps many user threads to one kernel thread, the one-to-one model maps one user thread to one kernel thread, and the many-to-many model maps many user threads to a smaller or equal number of kernel threads; all are true. Set (B) reverses the roles of user and kernel threads, so it is false.

Q548UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider a virtual page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1, 7, 0, 1 Suppose a demand paged virtual memory system running on a computer system such that the main memory has 3 page frames. Then.............. page replacement algorithm has minimum number of page faults.
  1. AFIFO
  2. BLIFO
  3. CLRU
  4. DOptimal
Show answerHide answer

Correct answer: (D) Optimal

Explanation

For this reference string with 3 frames, the optimal algorithm gives 9 page faults, fewer than FIFO, LIFO or LRU. So the optimal algorithm has the minimum number of page faults.

Q549UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Consider the following statements : (A) UNIX provides three types of permissions * Read * Write * Execute (B) UNIX provides three sets of permissions * permission for owner * permission for group * permission for others Which of the above statement/s is/are true?
  1. AOnly (A)
  2. BOnly (B)
  3. CBoth (A) and (B)
  4. DNeither (A) nor (B)
Show answerHide answer

Correct answer: (C) Both (A) and (B)

Explanation

UNIX provides read, write and execute permissions on files, and three sets of permissions: for the owner, for the group and for others. So both (A) and (B) are true.

Q550UGC NET Computer Science, November 2017 (Paper II & III, Selected Questions)
Match the following WINDOWS system calls and UNIX system calls with reference to process control and file manipulation. Windows A. Create - process ( ) B. Wait for single object ( ) C. Create file ( ) D. Close Handle ( ) UNIX i. Open ( ) ii. Close ( ) iii. Fork ( ) iv. Wait ( ) Code : A B C D
  1. Aiii iv i ii
  2. Biv iii i ii
  3. Civ iii ii i
  4. Diii iv ii i
Show answerHide answer

Correct answer: (B) iv iii i ii

Explanation

Note: the standard correspondence is CreateProcess() - fork(), WaitForSingleObject() - wait(), CreateFile() - open(), CloseHandle() - close(), i.e. A-iii, B-iv, C-i, D-ii, which is option (a); the book keys (b). The book's mapping is A-iv, B-iii, C-i, D-ii.

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.