313 Computer Science questions asked in BPSC TRE previous year papers, each with the correct answer and explanation. Read them free on UTpaper, or attempt the full papers as timed online tests.
Q101BPSC TRE 3.0 (2024) Computer Science Class 11-12
How many distinct binary search trees can be created out of 4 distinct keys?
A8
B24
C14
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 14
Explanation
The number of distinct BSTs on n keys is the Catalan number C(n) = (2n)!/((n+1)! n!). For n = 4, C(4) = 14.
Q102BPSC TRE 3.0 (2024) Computer Science Class 11-12
#include <stdio.h>
int main()
{
int i = 5, j = 10, k = 15;
printf("%d ", sizeof(k /=i+j));
printf("%d", k);
return 0;
}
Assume size of an integer as 4 bytes. What is the output of above program?
A2 1
B4 1
C4 15
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 4 15
Explanation
sizeof only looks at the type of its operand and does not evaluate the expression, so k /= i+j never runs. It prints 4 (size of int), then k is still 15.
Q103BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following statements is true about Big-O notation?
AIt represents the lower bound of an algorithm’s runtime.
BIt represents the upper bound of an algorithm’s runtime
CIt represents the average runtime of an algorithm.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) It represents the upper bound of an algorithm’s runtime
Explanation
Big-O gives an asymptotic upper bound on the growth of an algorithm's running time, usually used for the worst case. Big-Omega gives the lower bound.
Q104BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a step in the Divide and Conquer algorithm?
ACombine
BConquer
CDivide
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
Divide and Conquer has three steps: divide, conquer and combine. All three listed options are steps, so none of them is "NOT a step".
Q105BPSC TRE 3.0 (2024) Computer Science Class 11-12
Merge Sort is an example of which algorithm design paradigm?
AGreedy
BDivide and Conquer
CDynamic Programming
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Divide and Conquer
Explanation
Merge sort splits the array into halves, sorts each half recursively and merges them, which is the divide-and-conquer paradigm.
Q106BPSC TRE 3.0 (2024) Computer Science Class 11-12
How many edges does a spanning tree of a graph with N vertices have?
AN
BN − 1
CN(N − 1)/2
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) N − 1
Explanation
A spanning tree connects all N vertices with no cycle, so it has exactly N − 1 edges.
Q107BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a graph traversal algorithm?
AGreedy
BDivide and Conquer
CDynamic Programming
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Greedy, Divide and Conquer and Dynamic Programming are algorithm design paradigms, not graph traversal algorithms (BFS and DFS are), so more than one option is correct.
Q108BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT an NP-Complete problem?
ATraveling Salesman Problem
BBoolean Satisfiability Problem
CShortest Path Problem
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Shortest Path Problem
Explanation
The shortest path problem can be solved in polynomial time (for example with Dijkstra's algorithm), so it is not NP-complete. TSP (decision version) and SAT are NP-complete.
Q109BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is an advantage of using arrays?
AConstant time insertion and deletion
BAbility to store elements of different data types
CRandom access to elements using an index
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Random access to elements using an index
Explanation
Array elements sit in contiguous memory, so any element can be accessed directly by its index in O(1). Insertion and deletion cost O(n), and the elements must all be the same type.
Q110BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a basic operation performed on a data structure?
AEncryption
BDeletion
CInsertion
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Encryption
Explanation
Basic data structure operations are traversal, insertion, deletion, searching, sorting and merging. Encryption is a security operation.
Q111BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a type of operating system?
AReal-time operating system
BEmbedded operating system
CNetwork operating system
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Real-time, embedded and network operating systems are all types of OS, so more than one option is correct.
Q112BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a memory management technique used by operating systems?
APaging
BSegmentation
CFragmentation
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Fragmentation
Explanation
Paging and segmentation are memory management techniques. Fragmentation is a problem (wasted memory) they have to deal with, not a technique.
Q113BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a file system commonly used in operating systems?
ANTFS
BFAT32
CHFS+
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
NTFS (Windows), FAT32 (Windows and removable media) and HFS+ (macOS) are all common file systems, so more than one option is correct.
Q114BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a type of interrupt?
AHardware interrupt
BMemory interrupt
CSoftware interrupt
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Memory interrupt
Explanation
The interrupt types are hardware, software (traps) and internal or exception interrupts. "Memory interrupt" is not a standard type.
Q115BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is a page in paging?
AA fixed-size block of virtual memory
BA fixed-size block of physical memory
CA type of memory allocation
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) A fixed-size block of virtual memory
Explanation
A page is a fixed-size block of the logical (virtual) address space. The matching fixed-size block of physical memory is called a frame.
Q116BPSC TRE 3.0 (2024) Computer Science Class 11-12
In a system with a page size of 4 KB and a physical address space of 64 GB, what is the number of bits required for the page offset?
A10 bits
B12 bits
C14 bits
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) 12 bits
Explanation
The offset must address every byte in a page: 4 KB = 2¹² bytes, so 12 offset bits are needed. The 64 GB physical size affects only the frame number.
Q117BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is a segment base in segmentation?
AThe starting address of a segment in physical memory
BThe starting address of a segment in virtual memory
CThe ending address of a segment in physical memory
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) The starting address of a segment in physical memory
Explanation
The segment base is the starting physical address where the segment is placed in memory, and the limit gives its length.
Q118BPSC TRE 3.0 (2024) Computer Science Class 11-12
What causes thrashing to occur?
AExcessive paging activity
BInsufficient disk space
CHardware failures
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Excessive paging activity
Explanation
Thrashing happens when processes do not have enough frames, so pages are swapped in and out constantly. The CPU then spends more time paging than executing.
Q119BPSC TRE 3.0 (2024) Computer Science Class 11-12
Consider a system with a total physical memory of 8 GB and total virtual memory of 16 GB. If the system is using 6 GB of physical memory and 10 GB of virtual memory, how much memory is being swapped out?
A2 GB
B4 GB
C6 GB
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 2 GB
Explanation
Official BPSC final answer key: (A). Note: many solutions take 10 GB used − 6 GB physical = 4 GB swapped out, option (B).
Q120BPSC TRE 3.0 (2024) Computer Science Class 11-12
How is the TLB typically organized?
AAs a direct-mapped cache
BAs an associative cache
CAs a set-associative cache
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) As an associative cache
Explanation
A TLB is a small, fast associative memory that compares all its entries at once, so it is typically organised as an associative cache.
Q121BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a common file operation?
ACreate
BDelete
CRename
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Create, delete and rename are all standard file operations, along with open, read, write and close. More than one option is correct.
Q122BPSC TRE 3.0 (2024) Computer Science Class 11-12
Consider a disk queue with requests for I/O to blocks on cylinders. 98 183 37 122 14 124 65 67 considering FCFS (First Come First Served) scheduling, the total number of head movements is, if the disk head is initially at 53 is?
A640
B620
C630
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) 640
Explanation
Head movements: 53→98 (45), 183 (85), 37 (146), 122 (85), 14 (108), 124 (110), 65 (59), 67 (2). The total is 640 cylinders.
Q123BPSC TRE 3.0 (2024) Computer Science Class 11-12
Thread shares with other threads belonging to the same process its
Athread ID
Bprogram counter
Ccode section and data section
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) code section and data section
Explanation
Threads of the same process share the code section, the data section and OS resources such as open files. Each thread has its own thread ID, program counter, registers and stack.
Q124BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a type of DBMS?
ARelational DBMS
BObject-Oriented DBMS
CSequential DBMS
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Sequential DBMS
Explanation
Relational, object-oriented, hierarchical and network are types of DBMS. "Sequential" describes a file organisation, not a DBMS model.
Q125BPSC TRE 3.0 (2024) Computer Science Class 11-12
In a relational database, what is a primary key?
AA key used to uniquely identify each record in a table
BA key used to establish relationships between tables
CA key used to sort records in a table
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) A key used to uniquely identify each record in a table
Explanation
A primary key uniquely identifies each record (row) in a table and cannot be NULL. Linking tables is the job of a foreign key.
Q126BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which normal form ensures that every non-prime attribute in a table is fully functionally dependent on the primary key?
AFirst Normal Form (1NF)
BSecond Normal Form (2NF)
CThird Normal Form (3NF)
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Second Normal Form (2NF)
Explanation
2NF requires 1NF and that every non-prime attribute depend fully on the whole primary key, with no partial dependency on part of a composite key.
Q127BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which SQL command is used to add new rows to a database table?
AADD
BCREATE
CINSERT
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) INSERT
Explanation
INSERT INTO table VALUES (...) adds new rows. CREATE makes database objects such as tables.
Q128BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a disadvantage of using a distributed database system?
AImproved data accessibility
BIncreased data security
CData inconsistency
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Data inconsistency
Explanation
Copies of the same data at several sites can get out of sync, which causes data inconsistency. Better data accessibility is an advantage.
Q129BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the primary function of a router in a computer network?
ATo connect devices within the same network
BTo connect multiple networks together
CTo filter incoming traffic based on IP addresses
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) To connect multiple networks together
Explanation
A router connects separate networks and forwards packets between them using IP addresses. Devices within one LAN are connected by a switch.
Q130BPSC TRE 3.0 (2024) Computer Science Class 11-12
In the OSI model, which layer is responsible for routing and forwarding data packets?
AData Link Layer
BTransport Layer
CPhysical Layer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
Routing and forwarding packets is the job of the Network Layer (Layer 3), which is not among the options.
Q131BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which device is used to connect multiple devices within the same local area network (LAN)?
ARouter
BSwitch
CBridge
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Switch
Explanation
A switch connects many devices within the same LAN and forwards frames to the correct port using MAC addresses. A router links different networks.
Q132BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which protocol is used to send email over the Internet?
AFTP
BSMTP
CHTTP
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) SMTP
Explanation
SMTP (Simple Mail Transfer Protocol) sends email between servers. FTP transfers files and HTTP serves web pages.
Q133BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the purpose of a subnet mask in TCP/IP networking?
ATo identify the network portion of an IP address
BTo identify the host portion of an IP address
CTo convert IP addresses into domain names
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
The subnet mask separates an IP address into its network and host portions: the 1 bits mark the network part and the 0 bits mark the host part. So A and B are both correct.
Q134BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the maximum data rate of Bluetooth version 5.0?
A1 Mbps
B2 Mbps
C5 Mbps
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) 2 Mbps
Explanation
Bluetooth 5.0 (Low Energy) supports a maximum data rate of 2 Mbps, twice the 1 Mbps of Bluetooth 4.x LE.
Q135BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a software development life cycle model?
AWaterfall model
BAgile model
CSpiral model
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Waterfall, Agile and Spiral are all SDLC models, so more than one option is correct.
Q136BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a software development requirement?
AFunctional requirements
BSystem requirements
CPhysical requirements
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Physical requirements
Explanation
Software requirements are classified as functional, non-functional and system requirements. "Physical requirements" is not a standard category.
Q137BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the main difference between verification and validation in software testing?
AVerification ensures that the software is bug-free, while validation ensures that it meets the requirements.
BVerification is done before coding, while validation is done after coding.
CVerification checks if the software is built right, while validation checks if the right software is built.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Verification checks if the software is built right, while validation checks if the right software is built.
Explanation
Verification asks "are we building the product right?" (does it match the specification). Validation asks "are we building the right product?" (does it meet user needs).
Q138BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the purpose of a software prototype?
ATo serve as the final version of the software
BTo replace detailed documentation
CTo speed up the software development process
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
A prototype is an early working model built to understand and refine user requirements through feedback. It is not the final version, does not replace documentation, and is not mainly meant to speed up development.
Q139BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the primary goal of software engineering?
ATo write code efficiently
BTo develop software that meets user requirements within budget and schedule constraints
CTo develop software with the latest technologies
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) To develop software that meets user requirements within budget and schedule constraints
Explanation
Software engineering aims to deliver quality software that meets user requirements within budget and on schedule.
Q140BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a pillar of OOP?
AInheritance
BEncapsulation
CAbstraction
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Inheritance, encapsulation and abstraction, along with polymorphism, are the pillars of OOP, so more than one option is correct.
Q141BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which keyword is used in Java to implement inheritance?
Aextends
Binherits
Cimplements
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) extends
Explanation
Java uses extends for class inheritance (class B extends A). implements is used with interfaces, and inherits is not a Java keyword.
Q142BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the access specifier used to make members of a class accessible only within the same package?
Aprivate
Bpublic
Cpackage-private
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) package-private
Explanation
Java's default (package-private) access, with no modifier at all, makes a member visible only to classes in the same package.
Q143BPSC TRE 3.0 (2024) Computer Science Class 11-12
Inheritance in OOP allows a class to:
AInherit properties and behavior from another class
BCreate instances of another class
COverride methods of another class
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Inherit properties and behavior from another class
Explanation
Inheritance lets a class acquire the properties (fields) and behaviour (methods) of another class. Overriding is a separate feature that inheritance makes possible.
Q144BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the purpose of HTML in a web application?
ATo define the structure of web pages
BTo style web pages
CTo add interactivity to web pages
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) To define the structure of web pages
Explanation
HTML defines the structure and content of web pages. CSS adds styling and JavaScript adds interactivity.
Q145BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is an example of a server-side scripting language commonly used in web applications?
AHTML
BCSS
CC++
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
HTML and CSS are client-side markup and styling languages, and C++ is not a web scripting language. Server-side languages such as PHP, ASP or JSP are not listed.
Q146BPSC TRE 3.0 (2024) Computer Science Class 11-12
What is the computational complexity of the halting problem?
AO(1)
BO(n)
CNot computable
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Not computable
Explanation
Turing proved the halting problem is undecidable: no algorithm can decide for every program and input whether it halts. So it has no computational complexity; it is not computable.
Q147BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is NOT a component of a Turing machine?
AInput tape
BOutput tape
CControl unit
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Output tape
Explanation
A standard Turing machine has an input tape (which is also its working tape), a read/write head and a finite control unit. It has no separate output tape.
Q148BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which wireless communication technology is commonly used in IoT devices for short-range communication?
ABluetooth
BWi-Fi
C4G LTE
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Bluetooth
Explanation
Bluetooth (including BLE) is a low-power, short-range wireless technology widely used in IoT devices. Wi-Fi and 4G cover longer ranges and use more power.
Q149BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is an example of an IoT protocol used for device communication?
AHTTP
BFTP
CMQTT
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) MQTT
Explanation
MQTT is a lightweight publish-subscribe messaging protocol designed for IoT device communication.
Q150BPSC TRE 3.0 (2024) Computer Science Class 11-12
Which of the following is a subfield of AI?
AMachine Learning
BRobotics
CNatural Language Processing
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Machine learning, robotics and natural language processing are all subfields of AI, so more than one option is correct.
How to use these BPSC TRE Computer Science questions
Every question here was asked in a real BPSC TRE 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 BPSC TRE papers as timed tests to check your speed under exam conditions.