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.
Q201BPSC TRE 1.0 (2023) Computer Science Class 11-12
The values appearing in given attributes of any tuple in the referencing relation must likewise occur in specified attributes of at least one tuple in the referenced relation, according to _____ integrity constraint.
Areferential
Bprimary
Creferencing
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) referential
Explanation
Referential integrity requires every foreign key value in the referencing relation to appear as a key value in the referenced relation.
Q202BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following options is not true about the binary search tree?
AThe value of the left child should be less than the root node.
BThe value of the right child should be greater than the root node.
CThe left and right subtrees should also be a binary search tree.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
All three statements are true properties of a binary search tree, so none of them is false.
Q203BPSC TRE 1.0 (2023) Computer Science Class 11-12
The expression Y=AB+BC+AC shows the _____ operation.
AEX-OR
BSOP
CPOS
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) SOP
Explanation
Y = AB + BC + AC is a sum (OR) of product (AND) terms, so it is in sum-of-products (SOP) form.
Q204BPSC TRE 1.0 (2023) Computer Science Class 11-12
What are the canonical forms of Boolean expressions?
AOR and XOR
BNOR and XNOR
CSOM and POM
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) SOM and POM
Explanation
The canonical forms are sum of minterms (SOM, or canonical SOP) and product of maxterms (POM, or canonical POS).
Q205BPSC TRE 1.0 (2023) Computer Science Class 11-12
AC(A + B)DE
B[C(A + B)D + E′]
C[[C(A + B)D]E′]
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) C(A + B)DE
Explanation
The circuit gives A + B from the OR gate, then three AND gates in turn multiply it by C, D and E. So Y = C(A + B)DE, with E not inverted.
Q206BPSC TRE 1.0 (2023) Computer Science Class 11-12
Boolean algebra can be used
Afor designing the digital computers
Bin building logic symbols
Cin circuit theory
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Boolean algebra is used in designing digital computers, in building logic symbols and gates, and in switching circuit theory, so more than one option applies.
Q207BPSC TRE 1.0 (2023) Computer Science Class 11-12
What does the control unit generate to control other units?
ATransfer signals
BCommand signals
CControl signals
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Control signals
Explanation
The control unit generates control signals that direct the ALU, memory and I/O units.
Q208BPSC TRE 1.0 (2023) Computer Science Class 11-12
To display time in railway stations which digital circuit is used?
ASeven-segment decoder
BEight-segment encoder
C8 : 3 multiplexer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Seven-segment decoder
Explanation
Digital clocks at stations show digits on seven-segment displays, which are driven by seven-segment (BCD-to-7-segment) decoders.
Q209BPSC TRE 1.0 (2023) Computer Science Class 11-12
What kind of transmission medium is most appropriate to carry data in a computer network that is exposed to electrical interference?
AUnshielded twisted pair
BOptical fiber
CCoaxial cable
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Optical fiber
Explanation
Optical fiber carries data as light, so it is immune to electromagnetic interference. Twisted pair and coaxial cable carry electrical signals that interference can affect.
Q210BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which network topology requires a central controller or hub?
AStar
BMesh
CRing
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Star
Explanation
In a star topology every device is connected to a central hub or switch, which controls the communication.
Q211BPSC TRE 1.0 (2023) Computer Science Class 11-12
A collection of hyperlinked documents on the Internet forms the
AWorld Wide Web (WWW)
Be-mail system
Cmailing list
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) World Wide Web (WWW)
Explanation
The World Wide Web is the collection of hypertext documents (web pages) on the Internet that are linked by hyperlinks.
Q212BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is not a step in the Header translation procedure?
AThe IPv6 mapped address is changed to an IPv4 address by extracting the rightmost 32 bits
BThe value of the IPv6 priority field is discarded
CThe IPv6 flow label is considered
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) The IPv6 flow label is considered
Explanation
When an IPv6 header is translated to IPv4, the flow label is ignored. Using it is not part of the procedure, whereas extracting the rightmost 32 bits and dropping the priority are.
Q213BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following would breach the integrity of a system?
ALocking the room to prevent theft
BFull access rights for all users
CFitting the system with an anti-theft device
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Full access rights for all users
Explanation
Giving every user full access rights lets anyone change or delete data, which breaks integrity. Locks and anti-theft devices protect the system.
Q214BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which sublayer of the data link layer performs data link functions that depend upon the type of medium?
ALogical link control sublayer
BMedia access control sublayer
CNetwork interface control sublayer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Media access control sublayer
Explanation
The MAC sublayer handles functions that depend on the medium, such as framing and access control for Ethernet or Wi-Fi. LLC is independent of the medium.
Q215BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following is not a network topology?
APeer-to-peer
BRing
CBus
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Peer-to-peer
Explanation
Peer-to-peer is a network architecture (model), not a topology. Ring and bus are physical topologies.
Q216BPSC TRE 1.0 (2023) Computer Science Class 11-12
How do structures and classes in C++ differ?
AStructures by default hide every member whereas classes do not
BIn structures, members are public by default, whereas, in classes, they are private by default
CStructures cannot have private members, whereas classes can have
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Note: the answer key gives (D), but only (B) is correct: struct members are public by default and class members are private by default. C++ structures can also have private members, so (C) is false.
Q217BPSC TRE 1.0 (2023) Computer Science Class 11-12
When the mail server sends mail to other mail servers it becomes
ASMTP client
BSMTP server
Cpeer
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) SMTP client
Explanation
When a mail server sends mail to another mail server, it acts as an SMTP client and the receiving server acts as the SMTP server.
Q218BPSC TRE 1.0 (2023) Computer Science Class 11-12
The length of an IPv6 address is
A32 bits
B64 bits
C256 bits
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (E) None of the above
Explanation
An IPv6 address is 128 bits long. None of the listed sizes (32, 64, 256) is right; 32 bits is IPv4.
Q219BPSC TRE 1.0 (2023) Computer Science Class 11-12
What is the use of ios::trunc mode?
ATo open a file in input mode
BTo open a file in output mode
CTo truncate an existing file to zero
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) To truncate an existing file to zero
Explanation
ios::trunc discards the contents of an existing file when it is opened, cutting its length to zero.
Q220BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which layer of the TCP/IP stack corresponds to the OSI model transport layer?
AHost-to-host
BApplication
CInternet
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Host-to-host
Explanation
The TCP/IP host-to-host (transport) layer matches the OSI transport layer and provides TCP and UDP.
Q221BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is/are correct?
1. It is not possible to combine two or more files opening mode in open( ) method.
2. It is possible to combine two or more files opening mode in open( ) method.
3. ios::in and ios::out are input and output file opening modes respectively.
A1, 3
B2, 3
C3 only
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Official BPSC final answer key: (D). Note: by the usual reading only statements 2 and 3 are correct, i.e. option (B).
Q222BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following is true with regard to the ping command?
APing stands for Packet Internet Generator.
BThe ping command checks the port level connectivity between source destinations endpoints.
CPing summarizes the packet loss and round-trip delay between two IP endpoints.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Ping summarizes the packet loss and round-trip delay between two IP endpoints.
Explanation
Ping (Packet InterNet Groper) uses ICMP echo messages to report packet loss and round-trip time. It does not check ports.
Q223BPSC TRE 1.0 (2023) Computer Science Class 11-12
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to an integer is
Aint **fun(float **, char **)
Bint *fun(float *, char *)
Cint **fun(float *, char **)
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) int **fun(float *, char **)
Explanation
The function takes a float* and a char** and returns an int**, so the correct declaration is int **fun(float *, char **).
Q224BPSC TRE 1.0 (2023) Computer Science Class 11-12
The private key in asymmetric key cryptography is kept by
Asender
Breceiver
Csender and receiver
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) receiver
Explanation
Each party keeps its own private key secret. In public-key encryption, the receiver decrypts with the private key that only the receiver holds.
Q225BPSC TRE 1.0 (2023) Computer Science Class 11-12
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
long factorial (long a)
{
if (a>1)
return (a * factorial (a+1));
else
return(1);
}
int main( )
{
long num = 3;
cout <<num<<"!="<<factorial (num);
return 0;
}
A6
B24
CSegmentation fault
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Segmentation fault
Explanation
factorial(a + 1) makes the argument grow (3, 4, 5, ...), so a > 1 is never false. The recursion never ends, the stack overflows, and the program crashes with a segmentation fault.
Q226BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following features must be supported by any programming language to become a pure object-oriented programming language?
AEncapsulation
BInheritance
CPolymorphism
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
A pure object-oriented language must support encapsulation, inheritance and polymorphism (along with abstraction and objects), so all three are required.
Q227BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which is correct syntax of inheritance?
Aclass base_classname : access derived_classname {/*define class body*/};
Bclass derived_classname : access base_classname {/*define class body*/};
Cclass derived_classname : base_classname {/*define class body*/};
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
Both (B) and (C) are valid: class derived : access base { }; and, without an access specifier, class derived : base { }; where the default is private for classes.
Q228BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which one of the following is the correct definition of “is_array( );” function in C++?
AIt checks that the specified variable is of the array or not
BIt checks that the specified array is of single dimension or not
CIt checks that the specified array is of multi-dimension or not
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) It checks that the specified variable is of the array or not
Explanation
std::is_array<T> (in <type_traits>) checks whether a given type is an array type, returning true or false.
Q229BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is correct about the class?
AAn object is an instance of its class.
BA class is an instance of its object.
CAn object is the instance of the data type of that class.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) An object is an instance of its class.
Explanation
A class is a blueprint, and an object is an instance of its class. The reverse statement is wrong.
Q230BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following can be used to create an abstract class in the C++ programming language?
ABy using the pure virtual function in the class
BBy declaring a virtual function in the base class
CBy declaring the virtual keyword afterward the class declaration
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) By using the pure virtual function in the class
Explanation
A class becomes abstract when it has at least one pure virtual function, for example virtual void f() = 0;. Such a class cannot be instantiated.
Q231BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following statements is correct about the C++ programming language?
AIn C++, both the static and dynamic types checking are allowed.
BIn C++, member function are allowed to be of the type const.
CIn C++, dynamic checking is allowed.
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (D) More than one of the above
Explanation
All three statements are true. C++ does static type checking at compile time and dynamic checking with RTTI and dynamic_cast, and member functions can be declared const.
Q232BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which feature of OOP is indicated by the following code?
class student{int marks;};
class topper: public student{int age;
topper(int age) {this.age=age;}};
AEncapsulation and inheritance
BInheritance and polymorphism
CPolymorphism
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) Encapsulation and inheritance
Explanation
Data hidden inside the classes shows encapsulation, and topper deriving from student with public shows inheritance. There is no overloading or overriding, so polymorphism is not shown.
Q233BPSC TRE 1.0 (2023) Computer Science Class 11-12
Which of the following natural elements is the primary element in computer chips?
ACarbon
BSilicon
CIron
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Silicon
Explanation
Computer chips are made mainly from silicon, a semiconductor used for transistors and integrated circuits.
Q234BPSC TRE 2.0 (2023) Computer Science Class 11-12
The brain of computer is
ACPU
Bmemory
CI/O device
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) CPU
Explanation
The CPU is called the brain of the computer because it carries out all instructions, performs calculations in the ALU and controls every other unit through the control unit.
Q235BPSC TRE 2.0 (2023) Computer Science Class 11-12
Intel 8085 microprocessor is of _____ generation.
Afirst
Bsecond
Cthird
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) second
Explanation
Intel 8085 (1976) is an 8-bit microprocessor. 8-bit chips such as the 8008, 8080 and 8085 make up the second generation, after the 4-bit 4004 of the first generation.
Q236BPSC TRE 2.0 (2023) Computer Science Class 11-12
The maximum memory size of third generation microprocessor is
A4 GB
B16 MB
C16 GB
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) 16 MB
Explanation
The third generation consists of 16-bit processors such as the Intel 80286. Its 24 address lines can address 2²⁴ bytes, which is 16 MB of memory.
Q237BPSC TRE 2.0 (2023) Computer Science Class 11-12
CPU on a single chip is called
Amicroprocessor
Bmicrocontroller
Csolid-state device
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) microprocessor
Explanation
A microprocessor is a complete CPU (ALU, control unit and registers) on one integrated circuit. A microcontroller is different because it also puts memory and I/O on the chip.
Q238BPSC TRE 2.0 (2023) Computer Science Class 11-12
Computer on a single chip is called
Amicrocontroller
Bmicroprocessor
Cassembler
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) microcontroller
Explanation
A microcontroller puts a CPU, RAM, ROM and I/O ports on a single chip, so it is a complete computer on one chip. A microprocessor holds only the CPU.
Q239BPSC TRE 2.0 (2023) Computer Science Class 11-12
Which one of the following is used for playing video games?
AMouse
BTrackball
CJoystick
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Joystick
Explanation
A joystick is a lever that can move in any direction, and it is the standard input device for playing video games. Mice and trackballs are general pointing devices.
Q240BPSC TRE 2.0 (2023) Computer Science Class 11-12
_____ is used to store softwares that does not update.
ASRAM
BDRAM
CROM
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) ROM
Explanation
ROM is non-volatile and read-only, so it stores fixed software such as firmware and the BIOS that is not normally updated. SRAM and DRAM are volatile working memory.
Q241BPSC TRE 2.0 (2023) Computer Science Class 11-12
Which of the following contains a laser?
ACD Drive
BRAM
CHard Disk Drive
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (A) CD Drive
Explanation
A CD drive reads and writes the disc with a laser beam, which is why it is an optical drive. A hard disk uses magnetic heads, and RAM is electronic.
Q242BPSC TRE 2.0 (2023) Computer Science Class 11-12
A computer program that converts an assembly language program into equivalent machine language program is called
Acompiler
Bassembler
Clinker
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) assembler
Explanation
An assembler translates assembly-language mnemonics into the equivalent machine code. A compiler works on high-level languages, and a linker joins object files together.
Q243BPSC TRE 2.0 (2023) Computer Science Class 11-12
A computer program that converts a high-level language program into an equivalent machine language program is called
Aassembler
Bcompiler
Cloader
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) compiler
Explanation
A compiler translates the whole high-level program into machine code (object code) in one go. An assembler handles assembly language, and a loader loads programs into memory.
Q244BPSC TRE 2.0 (2023) Computer Science Class 11-12
A computer program that translates high-level language program into machine language program statement-by-statement is called
Acompiler
Bloader
Cinterpreter
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) interpreter
Explanation
An interpreter translates and executes a high-level program one statement at a time. A compiler, by contrast, translates the whole program at once.
Q245BPSC TRE 2.0 (2023) Computer Science Class 11-12
Which of the following is not an operating system?
ALinux
BWindows
COracle
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Oracle
Explanation
Oracle is a database management system (RDBMS), not an operating system. Linux and Windows are operating systems.
Q246BPSC TRE 2.0 (2023) Computer Science Class 11-12
A software that runs on a computer hardware and serves as a platform for other softwares to run is called
Asystem software
Boperating system
Capplication software
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) operating system
Explanation
An operating system runs directly on the hardware, manages its resources and provides the platform on which other software runs. System software is a wider category that also includes utilities and translators.
Q247BPSC TRE 2.0 (2023) Computer Science Class 11-12
Which of the following is not a system tool?
AScandisk
BFormat
CFolder
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) Folder
Explanation
Scandisk (which checks a disk) and Format (which prepares a disk) are system tools or utilities. A folder is only a container for organising files.
Q248BPSC TRE 2.0 (2023) Computer Science Class 11-12
The key/keys used to delete a file without allowing it to store in recycle bin is/are
ADelete
BShift + Delete
CCtrl + Delete
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (B) Shift + Delete
Explanation
Shift + Delete deletes a file permanently and skips the Recycle Bin. Delete on its own moves the file to the Recycle Bin.
Q249BPSC TRE 2.0 (2023) Computer Science Class 11-12
The three main components of a digital computer system are
Amemory, I/O, DMA
BALU, CPU, memory
Cmemory, CPU, I/O
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) memory, CPU, I/O
Explanation
A digital computer has three main parts: the CPU for processing, memory for storage, and I/O devices for input and output. The ALU is part of the CPU, so option (B) is not right.
Q250BPSC TRE 2.0 (2023) Computer Science Class 11-12
FFFF will be the last memory location in a memory of size
A16K
B32K
C64K
DMore than one of the above
ENone of the above
Show answerHide answer
Correct answer: (C) 64K
Explanation
FFFF in hex is 65535, so the addresses run from 0000 to FFFF. That is 65536 = 2¹⁶ locations, which is 64K.
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.