BPSC TRE · Topic-wise previous year questions

Computer Science Previous Year Questions (page 5)

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.

  • 313 questions
  • 9 topics
  • Official answer key
  • Free

Practise by topic

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.
  1. Areferential
  2. Bprimary
  3. Creferencing
  4. DMore than one of the above
  5. 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?
  1. AThe value of the left child should be less than the root node.
  2. BThe value of the right child should be greater than the root node.
  3. CThe left and right subtrees should also be a binary search tree.
  4. DMore than one of the above
  5. 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.
  1. AEX-OR
  2. BSOP
  3. CPOS
  4. DMore than one of the above
  5. 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?
  1. AOR and XOR
  2. BNOR and XNOR
  3. CSOM and POM
  4. DMore than one of the above
  5. 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
Derive the Boolean expression for the logic circuit shown below:
  1. AC(A + B)DE
  2. B[C(A + B)D + E′]
  3. C[[C(A + B)D]E′]
  4. DMore than one of the above
  5. 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
  1. Afor designing the digital computers
  2. Bin building logic symbols
  3. Cin circuit theory
  4. DMore than one of the above
  5. 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?
  1. ATransfer signals
  2. BCommand signals
  3. CControl signals
  4. DMore than one of the above
  5. 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?
  1. ASeven-segment decoder
  2. BEight-segment encoder
  3. C8 : 3 multiplexer
  4. DMore than one of the above
  5. 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?
  1. AUnshielded twisted pair
  2. BOptical fiber
  3. CCoaxial cable
  4. DMore than one of the above
  5. 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?
  1. AStar
  2. BMesh
  3. CRing
  4. DMore than one of the above
  5. 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
  1. AWorld Wide Web (WWW)
  2. Be-mail system
  3. Cmailing list
  4. DMore than one of the above
  5. 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?
  1. AThe IPv6 mapped address is changed to an IPv4 address by extracting the rightmost 32 bits
  2. BThe value of the IPv6 priority field is discarded
  3. CThe IPv6 flow label is considered
  4. DMore than one of the above
  5. 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?
  1. ALocking the room to prevent theft
  2. BFull access rights for all users
  3. CFitting the system with an anti-theft device
  4. DMore than one of the above
  5. 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?
  1. ALogical link control sublayer
  2. BMedia access control sublayer
  3. CNetwork interface control sublayer
  4. DMore than one of the above
  5. 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?
  1. APeer-to-peer
  2. BRing
  3. CBus
  4. DMore than one of the above
  5. 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?
  1. AStructures by default hide every member whereas classes do not
  2. BIn structures, members are public by default, whereas, in classes, they are private by default
  3. CStructures cannot have private members, whereas classes can have
  4. DMore than one of the above
  5. 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
  1. ASMTP client
  2. BSMTP server
  3. Cpeer
  4. DMore than one of the above
  5. 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
  1. A32 bits
  2. B64 bits
  3. C256 bits
  4. DMore than one of the above
  5. 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?
  1. ATo open a file in input mode
  2. BTo open a file in output mode
  3. CTo truncate an existing file to zero
  4. DMore than one of the above
  5. 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?
  1. AHost-to-host
  2. BApplication
  3. CInternet
  4. DMore than one of the above
  5. 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.
  1. A1, 3
  2. B2, 3
  3. C3 only
  4. DMore than one of the above
  5. 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?
  1. APing stands for Packet Internet Generator.
  2. BThe ping command checks the port level connectivity between source destinations endpoints.
  3. CPing summarizes the packet loss and round-trip delay between two IP endpoints.
  4. DMore than one of the above
  5. 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
  1. Aint **fun(float **, char **)
  2. Bint *fun(float *, char *)
  3. Cint **fun(float *, char **)
  4. DMore than one of the above
  5. 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
  1. Asender
  2. Breceiver
  3. Csender and receiver
  4. DMore than one of the above
  5. 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; }
  1. A6
  2. B24
  3. CSegmentation fault
  4. DMore than one of the above
  5. 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?
  1. AEncapsulation
  2. BInheritance
  3. CPolymorphism
  4. DMore than one of the above
  5. 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?
  1. Aclass base_classname : access derived_classname {/*define class body*/};
  2. Bclass derived_classname : access base_classname {/*define class body*/};
  3. Cclass derived_classname : base_classname {/*define class body*/};
  4. DMore than one of the above
  5. 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++?
  1. AIt checks that the specified variable is of the array or not
  2. BIt checks that the specified array is of single dimension or not
  3. CIt checks that the specified array is of multi-dimension or not
  4. DMore than one of the above
  5. 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?
  1. AAn object is an instance of its class.
  2. BA class is an instance of its object.
  3. CAn object is the instance of the data type of that class.
  4. DMore than one of the above
  5. 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?
  1. ABy using the pure virtual function in the class
  2. BBy declaring a virtual function in the base class
  3. CBy declaring the virtual keyword afterward the class declaration
  4. DMore than one of the above
  5. 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?
  1. AIn C++, both the static and dynamic types checking are allowed.
  2. BIn C++, member function are allowed to be of the type const.
  3. CIn C++, dynamic checking is allowed.
  4. DMore than one of the above
  5. 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;}};
  1. AEncapsulation and inheritance
  2. BInheritance and polymorphism
  3. CPolymorphism
  4. DMore than one of the above
  5. 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?
  1. ACarbon
  2. BSilicon
  3. CIron
  4. DMore than one of the above
  5. 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
  1. ACPU
  2. Bmemory
  3. CI/O device
  4. DMore than one of the above
  5. 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.
  1. Afirst
  2. Bsecond
  3. Cthird
  4. DMore than one of the above
  5. 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
  1. A4 GB
  2. B16 MB
  3. C16 GB
  4. DMore than one of the above
  5. 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
  1. Amicroprocessor
  2. Bmicrocontroller
  3. Csolid-state device
  4. DMore than one of the above
  5. 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
  1. Amicrocontroller
  2. Bmicroprocessor
  3. Cassembler
  4. DMore than one of the above
  5. 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?
  1. AMouse
  2. BTrackball
  3. CJoystick
  4. DMore than one of the above
  5. 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.
  1. ASRAM
  2. BDRAM
  3. CROM
  4. DMore than one of the above
  5. 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?
  1. ACD Drive
  2. BRAM
  3. CHard Disk Drive
  4. DMore than one of the above
  5. 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
  1. Acompiler
  2. Bassembler
  3. Clinker
  4. DMore than one of the above
  5. 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
  1. Aassembler
  2. Bcompiler
  3. Cloader
  4. DMore than one of the above
  5. 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
  1. Acompiler
  2. Bloader
  3. Cinterpreter
  4. DMore than one of the above
  5. 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?
  1. ALinux
  2. BWindows
  3. COracle
  4. DMore than one of the above
  5. 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
  1. Asystem software
  2. Boperating system
  3. Capplication software
  4. DMore than one of the above
  5. 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?
  1. AScandisk
  2. BFormat
  3. CFolder
  4. DMore than one of the above
  5. 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
  1. ADelete
  2. BShift + Delete
  3. CCtrl + Delete
  4. DMore than one of the above
  5. 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
  1. Amemory, I/O, DMA
  2. BALU, CPU, memory
  3. Cmemory, CPU, I/O
  4. DMore than one of the above
  5. 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
  1. A16K
  2. B32K
  3. C64K
  4. DMore than one of the above
  5. 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.

More BPSC TRE subjects