Q1 BPSC TRE 2.0 (2023) Computer Class 9-10 The brain of any computer system is
A ALU B memory C CPU D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) CPU
Explanation
The CPU fetches, decodes and executes instructions and controls the other parts, so it is called the brain of the computer.
Q2 BPSC TRE 2.0 (2023) Computer Class 9-10 When a key is pressed on keyboard, which standard is used for converting the keystroke into the corresponding bits?
A ANSI B ASCII C EBCDIC D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) ANSI
Explanation
Note: the official key gives (A) ANSI; the character code most commonly named for keystroke-to-bits conversion is ASCII (B). The key is kept as printed.
Q3 BPSC TRE 2.0 (2023) Computer Class 9-10 What difference do the fifth generation computers have from other generation computers?
A Technological advancement B Object-oriented programming C Scientific code D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
Fifth-generation computers are marked both by technological advancement (AI, parallel processing) and by object-oriented programming, so more than one option applies.
Q4 BPSC TRE 2.0 (2023) Computer Class 9-10 Source code is available to view, modify and redistribute in
A open source B licensed C proprietary D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) open source
Explanation
Open-source software makes its source code freely available to view, change and redistribute.
Q5 BPSC TRE 2.0 (2023) Computer Class 9-10 Machine language is
A machine dependent B difficult to program C error prone D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
Machine language depends on the processor, is hard to write and is error prone, so all of A, B and C hold (more than one).
Q6 BPSC TRE 2.0 (2023) Computer Class 9-10 An assembly language is a/an
A low-level programming language B middle-level programming language C Internet-based programming language D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) low-level programming language
Explanation
Assembly language uses mnemonics close to the hardware, so it is a low-level language.
Q7 BPSC TRE 2.0 (2023) Computer Class 9-10 A compiler is a translating program which
A translates instruction of a high-level language into machine language B translates entire source program into machine language program C It is not involved in program's execution D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
A compiler translates the whole high-level source program into machine code and is not part of the execution itself, so A, B and C are all true (more than one).
Q8 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following approaches is used by C++?
A Left-right B Top-down C Bottom-up D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Bottom-up
Explanation
C++ is an object-oriented language that builds a program from small objects and classes upward, which is the bottom-up approach.
Q9 BPSC TRE 2.0 (2023) Computer Class 9-10 What is virtual inheritance in C++?
A C++ technique to enhance multiple inheritance B C++ technique to ensure that a private member of the base class can be accessed somehow C C++ technique to avoid multiple copies of the base class into children/derived class D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) C++ technique to avoid multiple copies of the base class into children/derived class
Explanation
Virtual inheritance makes derived classes share one copy of a common base class, which avoids duplicate copies in diamond-shaped inheritance.
Q10 BPSC TRE 2.0 (2023) Computer Class 9-10 What is the difference between delete and delete[ ] in C++?
A Delete is syntactically correct but delete[ ] is wrong and hence will give an error if used in any case B Delete is used to delete normal objects whereas delete[ ] is used to delete pointer objects C Delete is used to delete single object whereas delete[ ] is used to delete multiple (array/pointer of) objects D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Delete is used to delete single object whereas delete[ ] is used to delete multiple (array/pointer of) objects
Explanation
delete frees a single object, while delete[] frees an array of objects (and calls each destructor).
Q11 BPSC TRE 2.0 (2023) Computer Class 9-10 The C++ code which causes abnormal termination/behaviour of a program should be written under _____ block.
A catch B throw C try D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) try
Explanation
Code that may raise an exception is placed inside a try block so that a matching catch block can handle it.
Q12 BPSC TRE 2.0 (2023) Computer Class 9-10 Pick the incorrect statement about inline functions in C++.
A They save overhead of a return call from a function. B They are generally very large and complicated function. C These functions are inserted/substituted at the point of call. D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) They are generally very large and complicated function.
Explanation
Inline functions are meant for small, simple functions; saying they are generally very large and complicated is incorrect.
Q13 BPSC TRE 2.0 (2023) Computer Class 9-10 What is abstract class in C++?
A Any class in C++ is an abstract class/Class from which any class is derived B Class specifically used as a base class with at least one virtual function C Class specifically used as a base class with at least one pure virtual function D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Class specifically used as a base class with at least one pure virtual function
Explanation
An abstract class is a base class that has at least one pure virtual function, so it cannot be instantiated.
Q14 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following constructors is provided by the C++ compiler if not defined in a class?
A Copy constructor B Default constructor C Parameterized constructor D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Default constructor
Explanation
If a class defines no constructor at all, the compiler supplies a default constructor.
Q15 BPSC TRE 2.0 (2023) Computer Class 9-10 How do structures and classes in C++ differ?
A In structures, members are private by default whereas in classes, they are public by default B In structures, members are public by default whereas in classes, they are private by default C Structures cannot have private members whereas classes can have D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) In structures, members are public by default whereas in classes, they are private by default
Explanation
In C++ the members of a struct are public by default, while those of a class are private by default.
Q16 BPSC TRE 2.0 (2023) Computer Class 9-10 The programming language that has the ability to create new data types is called
A overloaded B encapsulated C extensible D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) extensible
Explanation
A language that lets the programmer define new data types is called extensible.
Q17 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following is the original creator of the C++ language?
A Dennis Ritchie/Brian Kernighan B Ken Thompson C Bjarne Stroustrup D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Bjarne Stroustrup
Explanation
C++ was created by Bjarne Stroustrup at Bell Labs.
Q18 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following is the correct syntax to read the single character to console in the C++ language?
A read ch() B getlinech() C get(ch) D More than one of the above E None of the above Show answer Hide answer Correct answer: (E) None of the above
Explanation
None of the listed forms is valid C++ (the correct usage is cin.get(ch)), so the answer is None of the above.
Q19 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following gives the nth element of the Array?
A array[n]; B array[n–1]; C array[n+1]; D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) array[n–1];
Explanation
Array indices start at 0, so the nth element is array[n-1].
Q20 BPSC TRE 2.0 (2023) Computer Class 9-10 How many types of the array are there in the C++ programming language?
A There are three types of arrays B There are four types of arrays C There are two types of arrays D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) There are two types of arrays
Explanation
C++ arrays are classified as one-dimensional and multi-dimensional, i.e. two types, as the official key accepts.
Q21 BPSC TRE 2.0 (2023) Computer Class 9-10 In C++, for what purpose the "rank()" is used?
A It returns the size of each dimension B It returns the maximum number of elements that can be stored in the array C It returns the dimension of the specified array D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) It returns the dimension of the specified array
Explanation
rank() reports the number of dimensions of an array type.
Q22 BPSC TRE 2.0 (2023) Computer Class 9-10 What is the scope of the variable declared in the user-defined function?
A Whole program B Only inside the { } block C Inside the main function D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Only inside the { } block
Explanation
A variable declared inside a function is local and visible only within that function's { } block.
Q23 BPSC TRE 2.0 (2023) Computer Class 9-10 Which one of the following is the correct definition of the "is_array();" function in C++?
A It checks that the specified variable is of the array or not B It checks that the specified array is of single dimension or not C It checks that the array specified is of multi-dimension or not D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) It checks that the specified variable is of the array or not
Explanation
is_array checks whether the given type or variable is an array.
Q24 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following statements is true about the new and malloc?
I. The 'new' is a type of operator while 'malloc' is a kind of function.
II. The 'new' invokes a constructor, whereas 'malloc' does not invoke the constructor.
III. The 'malloc' returns void pointer and also needed to typecast whereas 'new' returns required pointer.
A Only I B Both I and II C Both II and III D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
All three statements are true (new is an operator that calls constructors; malloc is a function returning void*), so more than one option, i.e. (D), is correct.
Q25 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following can be considered as the members that can be inherited but not accessible in any class?
A Public B Protected C Private D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Private
Explanation
Private members are inherited by a derived class but cannot be accessed directly from it.
Q26 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following statements is completely true?
I. In an object-oriented programming language, all the function calls are resolved at compile-time.
II. In a procedure programming language, all the function calls are resolved at compile-time.
A Only II B Only I C Both I and II D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) Only II
Explanation
Object-oriented languages also use run-time (virtual) binding, so I is false; in procedural languages every call is resolved at compile time, so only II is true.
Q27 BPSC TRE 2.0 (2023) Computer Class 9-10 What will happen if in a C++ program, a class has no name?
A It is not even allowed in C++ B It will not have the constructor C It will not have the destructor D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) It will not have the destructor
Explanation
An unnamed class is allowed, but a destructor is declared with the class name, so such a class cannot declare a destructor; the official key is (C).
Q28 BPSC TRE 2.0 (2023) Computer Class 9-10 How can one implement the compile-time polymorphism in the C++ programming language?
A By using the template B By using the concepts of inheritance C By using both the virtual functions and inheritance D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) By using the template
Explanation
Templates (along with overloading) are resolved at compile time, so they implement compile-time polymorphism; virtual functions give run-time polymorphism.
Q29 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following refers to the wrapping of data and its functionality into a single individual entity?
A Modularity B Abstraction C Encapsulation D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Encapsulation
Explanation
Bundling data and the functions that work on it into one unit is encapsulation.
Q30 BPSC TRE 2.0 (2023) Computer Class 9-10 Among the following, which statement is correct about the modularity?
A Modularity means hiding the parts of the program. B Modularity refers to dividing a program into subsequent small modules or independent parts. C It refers to overloading the program's part. D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Modularity refers to dividing a program into subsequent small modules or independent parts.
Explanation
Modularity means splitting a program into small independent modules.
Q31 BPSC TRE 2.0 (2023) Computer Class 9-10 Which one of the following is not the application of the stack data structure?
A Asynchronous data transfer B String reversal C Backtracking D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) Asynchronous data transfer
Explanation
Stacks are used for string reversal and backtracking; asynchronous data transfer is handled with queues (buffers), so it is not a stack application.
Q32 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following is the prefix form of A+B*C?
A +A*BC B ABC+* C +AB*C D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) +A*BC
Explanation
B*C becomes *BC, and A + (B*C) in prefix is +A*BC.
Q33 BPSC TRE 2.0 (2023) Computer Class 9-10 Which data structure is required to convert the infix to prefix notation?
A Queue B Stack C Linked list D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Stack
Explanation
The conversion holds operators on a stack while scanning the expression, so a stack is needed.
Q34 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following highly uses the concept of an array?
A Binary search tree B Scheduling of processes C Spatial locality D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Spatial locality
Explanation
Spatial locality relies on elements being stored in contiguous memory, which is exactly how arrays are laid out.
Q35 BPSC TRE 2.0 (2023) Computer Class 9-10 The necessary condition to be checked before deletion from the queue is
A front value B underflow C overflow D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) underflow
Explanation
Before dequeuing, one must check that the queue is not empty, i.e. underflow.
Q36 BPSC TRE 2.0 (2023) Computer Class 9-10 Which one of the following is not the application of the queue data structure?
A Data is transferred asynchronously B Resource is shared between various systems C Balancing of symbols D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Balancing of symbols
Explanation
Balancing of symbols (parentheses) is done with a stack, not a queue.
Q37 BPSC TRE 2.0 (2023) Computer Class 9-10 Which one of the following techniques is not used in the binary tree?
A Preorder traversal B Inorder traversal C Postorder traversal D More than one of the above E None of the above Show answer Hide answer Correct answer: (E) None of the above
Explanation
Preorder, inorder and postorder are all binary-tree traversals, so none of A-C is the odd one out.
Q38 BPSC TRE 2.0 (2023) Computer Class 9-10 How can we describe an array in the best possible way?
A Arrays are immutable B Container that stores the elements of similar types C The array is not a data structure D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Container that stores the elements of similar types
Explanation
An array is a container that stores elements of the same type.
Q39 BPSC TRE 2.0 (2023) Computer Class 9-10 What is another name for the circular queue among the following options?
A Rectangle buffer B Square buffer C Ring buffer D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Ring buffer
Explanation
A circular queue is also called a ring buffer.
Q40 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following determines the need for the circular queue?
A Access the queue using priority B Avoid wastage of memory C Follow the FIFO principle D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Avoid wastage of memory
Explanation
A circular queue reuses the freed slots at the front, which avoids wasting memory.
Q41 BPSC TRE 2.0 (2023) Computer Class 9-10 Which data structure is the best for implementing a priority queue?
A Linked list B Array C Binary heap D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Binary heap
Explanation
A binary heap gives O(log n) insertion and removal of the highest-priority item, better than a list or array.
Q42 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following data structures finds its use in recursion?
A Stack B Linked list C Array D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) Stack
Explanation
Recursive calls are kept in the call stack, so the stack is used.
Q43 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following satisfies the property of the red-black tree?
A Black, if the new node is a root node B Red, if the new node is not a root node C Black, if the new node is not a root node D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
In a red-black tree the root is black and a newly inserted non-root node is coloured red, so both A and B hold (more than one).
Q44 BPSC TRE 2.0 (2023) Computer Class 9-10 In the deque implementation, using singly linked list, what would be the time complexity of deleting an element from the rear end?
A O(1) B O(N log N) C O(N) D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) O(N)
Explanation
In a singly linked list the node before the tail must be found by traversing the whole list, so deleting from the rear takes O(N).
Q45 BPSC TRE 2.0 (2023) Computer Class 9-10 Which one of the following is the overflow condition if linear queue is implemented using an array with a size MAX_SIZE?
A rear = MAX_SIZE–1 B rear = MAX_SIZE C rear = front+1 D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
Depending on whether rear points at the last used slot or one past it, both rear = MAX_SIZE-1 and rear = MAX_SIZE are accepted overflow conditions, so more than one is correct.
Q46 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following is a divide-and-conquer algorithm?
A Merge sort B Heap sort C Bubble sort D More than one of the above E None of the above Show answer Hide answer Correct answer: (A) Merge sort
Explanation
Merge sort splits the list in halves, sorts them and merges, which is divide and conquer.
Q47 BPSC TRE 2.0 (2023) Computer Class 9-10 What is a database?
A Organized collection of information that cannot be accessed, updated and managed B Organized collection of data or information that can be accessed, updated and managed C Organized collection of data that cannot be updated D More than one of the above E None of the above Show answer Hide answer Correct answer: (B) Organized collection of data or information that can be accessed, updated and managed
Explanation
A database is an organised collection of data that can be accessed, updated and managed.
Q48 BPSC TRE 2.0 (2023) Computer Class 9-10 Which type of data can be stored in the database?
A Image-oriented data B Text, files containing data C Data in the form of audio or video D More than one of the above E None of the above Show answer Hide answer Correct answer: (D) More than one of the above
Explanation
A database can hold images, text/files and audio or video data, so more than one option is correct.
Q49 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following is not a type of database?
A Network B Distributed C Decentralized D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Decentralized
Explanation
Network and distributed are standard database types; 'decentralized' is not a classical database type.
Q50 BPSC TRE 2.0 (2023) Computer Class 9-10 Which of the following is not an example of DBMS?
A Microsoft access B IBM Db2 C Google D More than one of the above E None of the above Show answer Hide answer Correct answer: (C) Google
Explanation
Microsoft Access and IBM Db2 are DBMS products; Google is a search engine company, not a DBMS.