723 Computer Science questions asked in Bihar STET previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
The Floyd-Warshall algorithm is a popular method for solving the All-Pair Shortest Paths problem. What is the time complexity of the Floyd-Warshall algorithm for a graph with "n" vertices?
AO(n)
BO(n log n)
CO(n^2)
DO(n^3)
Show answerHide answer
Correct answer: (D) O(n^3)
Explanation
Floyd-Warshall runs three nested loops over k, i and j, each from 1 to n, so it takes O(n³) time.
In multistage graphs, what is the property of optimality?
AThe shortest path between any two stages is the one with the fewest edges
BThe shortest path between any two stages is the one with the lowest total cost
CThe shortest path between any two stages is the one with the highest total cost
DThe shortest path between any two stages is the one with the most vertices
Show answerHide answer
Correct answer: (B) The shortest path between any two stages is the one with the lowest total cost
Explanation
By the principle of optimality, a minimum-cost path through a multistage graph is built from minimum-cost sub-paths, so the shortest path is the one with the lowest total cost.
Which of the following is not a common example of an abstract data type?
AStack
BInteger
CQueue
DList
Show answerHide answer
Correct answer: (B) Integer
Explanation
Integer is a primitive (built-in) data type, while stack, queue and list are abstract data types defined by their operations, independent of implementation.
In pointer implementation of linked lists, which operation can be performed in constant time (O(1)) when inserting or deleting nodes?
AInserting at the beginning
BInserting at the end
CInserting at a specific position
DDeleting a specific node
Show answerHide answer
Correct answer: (A) Inserting at the beginning
Explanation
Inserting at the beginning needs only to set newnode->next = head and head = newnode, which is O(1); inserting at the end or at a position requires traversal.
Which representation is best suited for matrices with a small number of non-zero elements in each row and column?
ATriplet representation
BCompressed sparse row (CSR) format
CCompressed sparse column (CSC) format
DArray representation
Show answerHide answer
Correct answer: (C) Compressed sparse column (CSC) format
Explanation
Compressed sparse formats store only non-zero values with their indices; CSC compresses the data column by column, so it suits sparse matrices and column-wise access. CSR is the row-wise counterpart.
For a 2-D array represented in row-major order, the index formula to access the element at row "i" and column "j" using the base address "B" is:
AIndex = B + (i * n + j)
BIndex = B + (j * n + i)
CIndex = B + (i + j)
DIndex = B + (i * m + j)
Show answerHide answer
Correct answer: (A) Index = B + (i * n + j)
Explanation
In row-major order the rows are stored one after another, so element (i, j) is at B + (i × n + j) for n columns (times the element size, taken as 1 here).
The Banker's algorithm is an example of a deadlock:
AAvoidance algorithm
BDetection algorithm
CPrevention algorithm
DTermination algorithm
Show answerHide answer
Correct answer: (A) Avoidance algorithm
Explanation
The Banker's algorithm checks before each allocation whether the system stays in a safe state, so it avoids deadlock rather than detecting or preventing it.
Priority Scheduling involves assigning a priority value to each process. Which scheduling algorithm is closely related to this concept?
AFCFS
BSJN
CMultilevel Queue Scheduling
DFirst-Come, First-Served (FCFS)
Show answerHide answer
Correct answer: (C) Multilevel Queue Scheduling
Explanation
Multilevel queue scheduling places processes in separate queues by priority class and serves higher-priority queues first, so it is built directly on priority scheduling.
The resource matrix is a data structure used in deadlock detection algorithms to:
ARepresent resource allocation
BRepresent the execution order of processes
CRepresent the execution history of processes
DRepresent the priority of processes
Show answerHide answer
Correct answer: (A) Represent resource allocation
Explanation
In deadlock detection, allocation and request matrices record which resources each process holds and requests, i.e. they represent resource allocation.
The term "race condition" in parallel programming refers to:
AA competition between processes to terminate first
BA competition between processes to access shared resources
CA situation where a process is stuck in a loop
DA situation where processes are running sequentially
Show answerHide answer
Correct answer: (B) A competition between processes to access shared resources
Explanation
A race condition occurs when processes access shared data concurrently and the result depends on the order of access, i.e. they compete for shared resources.
Users' typed commands cannot be executed by the hardware as they are; the command interpreter (shell) reads each command and translates it into system calls and programs the machine can run.
A large computer information system maintains many different computer files. Which amongst them is called a perpetual file?
ASpecialized File
BMaster File
CLog File
DUpdate File
Show answerHide answer
Correct answer: (B) Master File
Explanation
A master file holds relatively permanent core data (e.g. customer or employee records) that is kept and updated over time, so it is called a perpetual file.
HTTP is the application-layer protocol for transferring web pages between browsers and web servers, i.e. web browsing; email uses SMTP and file transfer FTP.
ISO 9000 and SEI CMM are both frameworks related to:
ASoftware testing
BSoftware documentation
CSoftware quality assurance and process improvement
DSoftware design principles
Show answerHide answer
Correct answer: (C) Software quality assurance and process improvement
Explanation
ISO 9000 and SEI CMM are quality frameworks: ISO 9000 sets quality management standards, and CMM rates and improves the maturity of software processes.
Which type of maintenance involves adding new features to existing software?
ACorrective Maintenance
BPerfective Maintenance
CAdaptive Maintenance
DPreventive Maintenance
Show answerHide answer
Correct answer: (B) Perfective Maintenance
Explanation
Perfective maintenance adds new features or improves performance in response to user needs; corrective fixes bugs and adaptive suits a new environment.
What is the term for defining multiple methods in a class with the same name but different parameters?
AOverriding
BOverloading
CInheriting
DInheritance
Show answerHide answer
Correct answer: (B) Overloading
Explanation
Overloading means several methods in the same class share a name but have different parameter lists; overriding redefines an inherited method with the same signature.
What is the role of a Document Type Definition (DTD) in XML?
AIt defines the structure and data types of XML documents.
BIt provides a list of external resources for an XML document.
CIt specifies the styling rules for XML elements.
DIt encrypts the content of an XML document
Show answerHide answer
Correct answer: (A) It defines the structure and data types of XML documents.
Explanation
A DTD defines the legal structure of an XML document: which elements and attributes are allowed, their order and nesting, so the document can be validated.
A universal Turing machine takes the description of any other TM and its input and simulates it, so it is a reprogrammable (stored-program) Turing machine.
which of the following is Capabilities of Expert Systems?
APossessing human capabilities
BSuggesting alternative options to a problem
CRefining their own knowledge
DSubstituting human decision makers
Show answerHide answer
Correct answer: (B) Suggesting alternative options to a problem
Explanation
Expert systems can advise, explain and suggest alternative solutions, but they cannot possess human abilities, refine their own knowledge or replace human decision makers.
Secure e-commerce transactions need integrity (data not altered), confidentiality (data not disclosed) and overall security such as authentication, so all apply.
_____ refers to simulated motion pictures showing movement of drawn objects.
AMotion
BAnimation
CVR
DSMD
Show answerHide answer
Correct answer: (B) Animation
Explanation
Animation is a sequence of drawn images shown in quick succession to simulate motion of objects.
How to use these Bihar STET Computer Science questions
Every question here was asked in a real Bihar STET 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 Bihar STET papers as timed tests to check your speed under exam conditions.