Computer ScienceComputer Networking BPSCID: BPP-852
Which protocol assigns IP address to the client connected in the internet?
- ADHPP
- BDHHP
- CDHCP ✓ Correct answer
- DNone of these
✓ Correct answer: DHCP
Full explanation
DHCP. The Dynamic Host Configuration Protocol automatically assigns IP addresses to devices on a network, along with the subnet mask, gateway and DNS information.
Computer ScienceOperating Systems BPSCID: BPP-875
Which scheduling algorithm is least prone to starvation?
- AFCFS ✓ Correct answer
- BRound Robin
- CShortest Job Next
- DNone of these
✓ Correct answer: FCFS
Full explanation
FCFS. First-Come, First-Served runs processes in the order they arrive, so every process eventually executes and no process can be starved indefinitely.
Computer ScienceOperating Systems BPSCID: BPP-876
Which scheduling algorithm is most prone to starvation?
- AFCFS
- BRound Robin
- CShortest Job Next ✓ Correct answer
- DNone of these
✓ Correct answer: Shortest Job Next
Full explanation
Shortest Job Next. Shortest Job Next favours short jobs, so a long job can wait indefinitely while shorter jobs keep arriving, which is starvation.
Computer ScienceOperating Systems BPSCID: BPP-877
Which of the following is necessary condition for deadlock?
- ACircular Wait
- BMutual Exclusion
- CHold and Wait
- DAll of them ✓ Correct answer
✓ Correct answer: All of them
Full explanation
All of them. Deadlock requires all four Coffman conditions: mutual exclusion, hold and wait, no preemption and circular wait.
Computer ScienceOperating Systems BPSCID: BPP-878
Which is not a necessary condition for deadlock? Preemption, Mutual Exclusion, Hold and Wait, Circular Wait
- APreemption ✓ Correct answer
- BMutual Exclusion
- CHold and Wait
- DCircular Wait
✓ Correct answer: Preemption
Full explanation
Preemption. The four necessary conditions for deadlock are mutual exclusion, hold and wait, no preemption and circular wait, so preemption itself is not a necessary condition; in fact, allowing preemption can prevent or resolve a deadlock.
Computer ScienceOperating Systems BPSCID: BPP-879
Which algorithm is used for deadlock detection?
- ALRU
- BBanker's Algorithm
- CFIFO
- DNone of these ✓ Correct answer
✓ Correct answer: None of these
Full explanation
Banker's Algorithm. The Banker's algorithm tests whether granting a resource request leaves the system in a safe state, which is how deadlocks are avoided (and unsafe states detected); it is the only deadlock-related option here. Note: strictly, it is an avoidance algorithm rather than a pure detection algorithm.
Computer ScienceOperating Systems BPSCID: BPP-880
Which method ensures mutual exclusion in concurrency control?
- ARAID
- BPaging
- CMutex ✓ Correct answer
- DNone of these
✓ Correct answer: Mutex
Full explanation
Mutex. A mutex (mutual exclusion object) ensures only one process or thread accesses a shared resource at a time, preventing race conditions.
Computer ScienceOperating Systems BPSCID: BPP-881
Which scheduling policy gives each process a fixed time slot?
- ARound Robin ✓ Correct answer
- BFCFS
- CSJF
- DNone of these
✓ Correct answer: Round Robin
Full explanation
Round Robin. Round Robin gives each process a fixed time slice (quantum) in cyclic order, ensuring fair CPU sharing among all ready processes.
Computer ScienceOperating Systems BPSCID: BPP-882
In which type of operating system is response time critical?
- AMulti tasking
- BReal time ✓ Correct answer
- CBatch processing
- DNone of these
✓ Correct answer: Real time
Full explanation
Real time. A real-time operating system is designed for time-critical tasks where the response time must be predictable and delays cannot be tolerated.
Computer ScienceOperating Systems BPSCID: BPP-883
Which type of operating system has a very limited user interface?
- AMulti tasking
- BReal time
- CBatch processing
- DEmbedded ✓ Correct answer
✓ Correct answer: Embedded
Full explanation
Embedded. Embedded operating systems run on dedicated hardware for specific tasks and have a minimal or no user interface, being optimised for resource efficiency and real-time performance.
Computer ScienceOperating Systems BPSCID: BPP-884
The software that contains the core components of the operating system is called _____?
- AMiddle
- BFunction
- CComponent
- DKernel ✓ Correct answer
✓ Correct answer: Kernel
Full explanation
Kernel. The kernel contains the core components of the operating system: it manages CPU, memory and devices and acts as a bridge between hardware and software.
Computer ScienceComputer Networking BPSCID: BPP-885
Which class of IP address provides the most host addresses per network?
- AClass D
- BClass A ✓ Correct answer
- CClass B
- DNone of these
✓ Correct answer: Class A
Full explanation
Class A. Class A addresses have the largest host portion (24 host bits), allowing up to about 16 million host addresses per network, more than Class B or Class D.
Computer ScienceComputer Networking BPSCID: BPP-886
Which protocol is commonly used for secure remote access to a network device?
- AFTP
- BSSH ✓ Correct answer
- CTelnet
- DNone of these
✓ Correct answer: SSH
Full explanation
SSH. Secure Shell (SSH) provides encrypted remote access to a network device, unlike Telnet, which sends data including passwords in plain text.
Computer ScienceComputer Networking BPSCID: BPP-887
Which of the following is NOT a function of the Network Layer? Addressing, Routing, Error Detection, Packet Forwarding
- AAddressing
- BRouting
- CError Detection ✓ Correct answer
- DPacket Forwarding
✓ Correct answer: Error Detection
Full explanation
Error Detection. The network layer handles addressing, routing and packet forwarding; error detection is primarily the responsibility of the data link layer, not the network layer.
Computer ScienceComputer Networking BPSCID: BPP-888
Which layer in the OSI model is responsible for end-to-end communication and error recovery?
- ASession
- BNetwork
- CTransport ✓ Correct answer
- DNone of these
✓ Correct answer: Transport
Full explanation
Transport. The transport layer is responsible for end-to-end communication between devices, providing reliable delivery with error detection and recovery.
Computer ScienceSoftware BPSCID: BPP-889
Which testing type ensures changes don't introduce new defects?
- ASystem
- BIntegration
- CRegression ✓ Correct answer
- DNone of these
✓ Correct answer: Regression
Full explanation
Regression. Regression testing checks that recent changes have not introduced new defects or broken existing functionality, keeping the software stable after updates.
Computer ScienceSoftware BPSCID: BPP-890
Which testing technique involves testing the internal structure of the code?
- ASystem
- BBlack box
- CWhite box ✓ Correct answer
- DNone of these
✓ Correct answer: White box
Full explanation
White box. White box testing examines the internal structure, logic and code paths of the program, while black box testing checks behaviour without knowledge of the internals.
Computer ScienceSoftware BPSCID: BPP-891
Which of the following are common non functional requirements?
- AUsability
- BPerformance
- CSecurity
- DAll of them ✓ Correct answer
✓ Correct answer: All of them
Full explanation
All of them. Usability, performance and security are all non-functional requirements: they specify how a system performs rather than what it does.
Computer ScienceSoftware BPSCID: BPP-892
Which software development practice involves continuous integration and continuous delivery?
- APrototyping
- BWaterfall
- CAgile/DevOps ✓ Correct answer
- DNone of these
✓ Correct answer: Agile/DevOps
Full explanation
Agile/DevOps. Agile and DevOps practices emphasise continuous integration and continuous delivery (CI/CD) for faster, more reliable releases through iterative development and automation.
Computer ScienceSoftware BPSCID: BPP-893
User stories are derived from which of the following diagrams?
- ASequence diagram
- BClass diagram
- CUse case diagram ✓ Correct answer
- DNone of these
✓ Correct answer: Use case diagram
Full explanation
Use case diagram. User stories are derived from use case diagrams, which describe functional requirements from the user's perspective as interactions between actors and the system.
Computer ScienceNumber Systems BPSCID: BPP-902
Most widely used method for representing signed integers in modern computers?
- AExcess 127
- B1's complement
- C2's complement ✓ Correct answer
- DNone of these
✓ Correct answer: 2's complement
Full explanation
2's complement. Two's complement is the most widely used method for representing signed integers in modern computers: it allows addition and subtraction with the same logic and has a single representation of zero.
Computer ScienceDatabases & DBMS BPSCID: BPP-911
Which diagram is primarily used for designing database’s logical schema?
- AERD ✓ Correct answer
- BFlowchart
- CData flow
- DNone of these
✓ Correct answer: ERD
Full explanation
ERD. An Entity Relationship Diagram (ERD) is used to design a database's logical schema, showing entities, attributes and the relationships between them.
Computer ScienceDatabases & DBMS BPSCID: BPP-912
Which of the following refers to virtual table based on a query?
- ATrigger
- BIndex
- CView ✓ Correct answer
- DNone of these
✓ Correct answer: View
Full explanation
View. A view is a virtual table based on the result of a SQL query: it stores no data itself but displays data dynamically from the underlying tables.
Computer ScienceDatabases & DBMS BPSCID: BPP-913
What term describes the logical structure of a database?
- ADatabase schema ✓ Correct answer
- BData instance
- CData file
- DNone of these
✓ Correct answer: Database schema
Full explanation
Database schema. A database schema describes the logical structure of a database, including its tables, fields, relationships and constraints; it is the blueprint of how data is organised.
Computer ScienceDatabases & DBMS BPSCID: BPP-914
Which database object is automatically executed in response to specific events?
- AFunction
- BIndex
- CTrigger ✓ Correct answer
- DNone of these
✓ Correct answer: Trigger
Full explanation
Trigger. A trigger is a database object that is automatically executed in response to specific events such as INSERT, UPDATE or DELETE, and is used to enforce rules and audit changes.
Computer ScienceDatabases & DBMS BPSCID: BPP-915
Which of the following enhances query performance by dividing large tables into smaller ones?
- AReplication
- BPartitioning ✓ Correct answer
- CNormalization
- DNone of these
✓ Correct answer: Partitioning
Full explanation
Partitioning. Partitioning divides a large table into smaller parts by range, list or hash, which improves query performance and makes maintenance easier on large datasets.
Computer ScienceSQL BPSCID: BPP-916
Which SQL aggregate function ignores NULL values?
- AMax()
- BSum()
- CAvg()
- DAll of them ✓ Correct answer
✓ Correct answer: All of them
Full explanation
All of them. The SQL aggregate functions MAX(), SUM() and AVG() all ignore NULL values; only non-NULL values are considered in the calculation.
Computer ScienceDatabases & DBMS BPSCID: BPP-917
Which locking strategy is most effective at minimizing the occurrence of deadlocks?
- AExclusive
- BPessimistic
- COptimistic ✓ Correct answer
- DNone of these
✓ Correct answer: Optimistic
Full explanation
Optimistic. Optimistic locking assumes conflicts are rare, so transactions proceed without holding locks and are validated at commit time; holding locks for less time reduces the chance of deadlocks.
Computer ScienceDatabases & DBMS BPSCID: BPP-918
Which of the following is an example of a column-oriented NoSQL database?
- ANeo4j
- BMongoDB
- CCassandra ✓ Correct answer
- DNone of these
✓ Correct answer: Cassandra
Full explanation
Cassandra. Cassandra is a column-oriented (wide-column) NoSQL database, storing data in column families and designed for high scalability and availability across distributed systems.
Computer ScienceDatabases & DBMS BPSCID: BPP-919
A clustered index primarily affects _____?
- AData backups
- BQuery speed only
- CPhysical data order ✓ Correct answer
- DNone of these
✓ Correct answer: Physical data order
Full explanation
Physical data order. A clustered index determines the physical order of data rows in a table, which also improves range-query performance.
Computer ScienceDatabases & DBMS BPSCID: BPP-920
Which normalization form addresses transitive dependencies?
- A1NF
- B2NF
- C3NF ✓ Correct answer
- DNone of these
✓ Correct answer: 3NF
Full explanation
3NF. Third Normal Form (3NF) removes transitive dependencies, where a non-key attribute depends on another non-key attribute, so that every non-key attribute depends only on the primary key.
Computer ScienceOperating Systems BPSCID: BPP-3699
Which of the following is an example of a real-time operating system?
- AVxWorks ✓ Correct answer
- BWindows 11
- CMS-DOS
- DUbuntu
✓ Correct answer: VxWorks
Full explanation
VxWorks is a real-time operating system designed for embedded systems with strict timing requirements.
Computer ScienceOperating Systems BPSCID: BPP-3700
The process of loading a program into memory for execution is called?
- AScheduling
- BLoading ✓ Correct answer
- CSwapping
- DPaging
✓ Correct answer: Loading
Full explanation
Loading is the process of bringing a program from secondary storage into main memory for execution.
Computer ScienceOperating Systems BPSCID: BPP-3701
Which CPU scheduling algorithm gives the minimum average waiting time?
- AFCFS
- BRound Robin
- CSJF ✓ Correct answer
- DPriority scheduling
✓ Correct answer: SJF
Full explanation
Shortest Job First (SJF) scheduling gives the minimum average waiting time among the standard algorithms.
Computer ScienceOperating Systems BPSCID: BPP-3702
A deadlock occurs when processes are blocked forever waiting for resources held by each other. Which condition is necessary for deadlock?
- APreemption
- BSingle process execution
- CResource sharing without limits
- DMutual exclusion ✓ Correct answer
✓ Correct answer: Mutual exclusion
Full explanation
Mutual exclusion is one of the four necessary conditions for deadlock: a resource can be held by only one process at a time.
Computer ScienceDatabases & DBMS BPSCID: BPP-3704
The process of organising data in a database to reduce redundancy is called?
- AIndexing
- BNormalisation ✓ Correct answer
- CQuerying
- DClustering
✓ Correct answer: Normalisation
Full explanation
Normalisation organises data into tables to reduce redundancy and improve data integrity.
Computer ScienceDatabases & DBMS BPSCID: BPP-3705
Which normal form eliminates transitive dependencies?
- A3NF ✓ Correct answer
- B2NF
- C1NF
- DBCNF
✓ Correct answer: 3NF
Full explanation
Third normal form (3NF) removes transitive dependencies, where a non-key attribute depends on another non-key attribute.
Computer ScienceDatabases & DBMS BPSCID: BPP-3706
In a relational database, a row is also called?
- AAttribute
- BTuple ✓ Correct answer
- CSchema
- DDomain
✓ Correct answer: Tuple
Full explanation
The correct answer is Tuple. In a relational database, a row is called a tuple and a column is called an attribute.
Computer ScienceComputer Networking BPSCID: BPP-3707
Which device connects two different networks and routes data between them?
- ASwitch
- BRepeater
- CHub
- DRouter ✓ Correct answer
✓ Correct answer: Router
Full explanation
The correct answer is Router. A router connects different networks and forwards data packets between them using IP addresses.
Computer ScienceComputer Networking BPSCID: BPP-3708
The IP address 192.168.1.1 belongs to which class of addresses?
- AClass A
- BClass B
- CClass D
- DClass C ✓ Correct answer
✓ Correct answer: Class C
Full explanation
The address 192.168.1.1 falls in the range 192.0.0.0 to 223.255.255.255, which is Class C.
Computer ScienceSoftware BPSCID: BPP-3709
Which software development model follows a linear sequential approach?
- AAgile model
- BPrototype model
- CSpiral model
- DWaterfall model ✓ Correct answer
✓ Correct answer: Waterfall model
Full explanation
The correct answer is Waterfall model. The waterfall model follows a linear sequential approach, with each phase completed before the next begins.
Computer ScienceSoftware BPSCID: BPP-3710
What is the name of the process of locating and correcting errors in a program?
- ACompiling
- BDebugging ✓ Correct answer
- CTesting
- DDocumenting
✓ Correct answer: Debugging
Full explanation
Debugging is the process of finding and fixing errors (bugs) in a program.
Computer ScienceNumber Systems BPSCID: BPP-3713
The binary equivalent of the decimal number 13 is?
- A1011
- B1101 ✓ Correct answer
- C1110
- D1001
✓ Correct answer: 1101
Full explanation
13 in decimal equals 1101 in binary (8 + 4 + 0 + 1).
ProgrammingData Structures & Algorithms BPSCID: BPP-851
Which data structure uses LIFO (Last In, First Out) principle?
- AStack ✓ Correct answer
- BQueue
- CLinked List
- DNone of these
✓ Correct answer: Stack
Full explanation
Stack. A stack follows the LIFO (Last In, First Out) principle: the last element pushed is the first one popped. Elements are added with Push and removed with Pop, and stacks are used for function calls and expression evaluation.
ProgrammingData Structures & Algorithms BPSCID: BPP-853
Which sorting algorithm is the fastest in the average case?
- AQuick Sort ✓ Correct answer
- BMerge Sort
- CBubble Sort
- DNone of these
✓ Correct answer: Quick Sort
Full explanation
Quick Sort. Quick sort has an average-case time complexity of O(n log n) with small constant factors, making it the fastest on average among the options given; merge sort is also O(n log n) on average but is usually slower in practice.
ProgrammingData Structures & Algorithms BPSCID: BPP-854
Which data structure is used for recursion?
- AGraph
- BQueue
- CStack ✓ Correct answer
- DNone of these
✓ Correct answer: Stack
Full explanation
Stack. Recursion uses a stack: each function call is pushed onto the call stack in LIFO order and popped when it completes, so the most recent call finishes first.
ProgrammingData Structures & Algorithms BPSCID: BPP-859
A connected graph with n vertices and n-1 edges is always a _____?
- AEulerian Graph
- BCycle
- CTree ✓ Correct answer
- DNone of these
✓ Correct answer: Tree
Full explanation
Tree. A connected graph with n vertices and n-1 edges is always a tree: it has no cycles and there is a unique path between any two vertices.
ProgrammingData Structures & Algorithms BPSCID: BPP-860
A graph with no cycles is called a _____?
- AWeighted Graph
- BTree ✓ Correct answer
- CBipartite Graph
- DNone of these
✓ Correct answer: Tree
Full explanation
Tree. A connected graph with no cycles is a tree, with n vertices and n-1 edges and a unique path between any two vertices. Note: the question does not state 'connected', so strictly an acyclic graph in general is a forest; the paper's intended answer is Tree.
ProgrammingC++ Programming BPSCID: BPP-865
Which term is used to write an object to disk?
- ATokenization
- BSerialization ✓ Correct answer
- CDe-serialization
- DNone of these
✓ Correct answer: Serialization
Full explanation
Serialization. Serialization converts an object into a format that can be stored on disk or transmitted over a network, and later reconstructed by deserialization.
ProgrammingC++ Programming BPSCID: BPP-866
How is dynamically allocated memory de allocated in C++?
- AUsing erase()
- BAutomatically
- CUsing delete ✓ Correct answer
- DNone of these
✓ Correct answer: Using delete
Full explanation
Using delete. In C++, memory allocated with new is deallocated with delete, and memory allocated for arrays with new[] is freed with delete[].
ProgrammingC++ Programming BPSCID: BPP-867
Which catch block should be written first when handling multiple exceptions?
- AOrder Irrelevant
- BGeneral
- CSpecific ✓ Correct answer
- DNone of these
✓ Correct answer: Specific
Full explanation
Specific. When handling multiple exceptions, specific catch blocks must come before general ones, because a general catch written first would catch the exception and the specific handlers would never run.
ProgrammingC++ Programming BPSCID: BPP-868
Which keyword is used to define an exception block?
- AFinally
- BCatch
- CTry ✓ Correct answer
- DThrow
✓ Correct answer: Try
Full explanation
Try. The try block encloses code that may generate an exception; a matching catch block then handles the exception, and throw raises one.
ProgrammingC++ Programming BPSCID: BPP-869
When overriding function which of following should be the same in base and derived class?
- AFunction name
- BReturn type
- CBoth A and B ✓ Correct answer
- DParameter list
✓ Correct answer: Both A and B
Full explanation
Both A and B. In function overriding, the function name and return type in the derived class must be the same as in the base class, and the parameter list is identical too.
ProgrammingC++ Programming BPSCID: BPP-870
When overloading functions which of the following must be different?
- AFunction name
- BReturn type
- CBoth A and B
- DParameter list ✓ Correct answer
✓ Correct answer: Parameter list
Full explanation
Parameter list. Overloaded functions share the same name but must have different parameter lists (different number or types of parameters); return type alone cannot distinguish them.
ProgrammingC++ Programming BPSCID: BPP-871
When overloading functions which of the following should be the same?
- AFunction name ✓ Correct answer
- BReturn type
- CBoth A and B
- DParameter list
✓ Correct answer: Function name
Full explanation
Function name. Function overloading requires the same function name with different parameter lists; the return type may be the same or different but cannot by itself distinguish overloads.
ProgrammingC++ Programming BPSCID: BPP-872
Which feature simplifies complexity by emphasizing high-level design?
- APolymorphism
- BAbstraction ✓ Correct answer
- CInheritance
- DAll of them
✓ Correct answer: Abstraction
Full explanation
Abstraction. Abstraction hides implementation details and shows only the essential features, simplifying complexity by emphasising high-level design.
ProgrammingC++ Programming BPSCID: BPP-873
Feature which enables objects of different classes to respond differently to the same message?
- APolymorphism ✓ Correct answer
- BAbstraction
- CInheritance
- DAll of them
✓ Correct answer: Polymorphism
Full explanation
Polymorphism. Polymorphism lets objects of different classes respond differently to the same message or function call, increasing flexibility and code reuse.
ProgrammingC++ Programming BPSCID: BPP-874
Which of the following deals with protecting an object's internal data by controlling access?
- APolymorphism
- BEncapsulation ✓ Correct answer
- CInheritance
- DAll of them
✓ Correct answer: Encapsulation
Full explanation
Encapsulation. Encapsulation protects an object's internal data by hiding it and controlling access through methods, preserving data integrity and security.
ProgrammingC Programming BPSCID: BPP-894
Which type of pointer can store the address of any data type?
- Afloat*
- Bint*
- Cvoid* ✓ Correct answer
- DNone of these
✓ Correct answer: void*
Full explanation
void*. A void* pointer is a generic pointer that can store the address of any data type; it must be typecast to the appropriate pointer type before dereferencing.
ProgrammingC Programming BPSCID: BPP-895
Which operator is used to access the value at a pointer's address?
- A[]
- B* ✓ Correct answer
- C&
- DNone of these
✓ Correct answer: *
Full explanation
*. The * operator, called the dereference operator, is used to access the value stored at a pointer's address; & gives the address of a variable.
ProgrammingC Programming BPSCID: BPP-896
Where is dynamically allocated memory stored?
- AArray
- BStack
- CHeap ✓ Correct answer
- DNone of these
✓ Correct answer: Heap
Full explanation
Heap. Dynamically allocated memory (via malloc or new) is stored in the heap segment and persists until it is explicitly deallocated, unlike stack memory.
ProgrammingC Programming BPSCID: BPP-897
Stack memory stores which of the following when a function is called _____?
- AReturn addresses
- BLocal variables
- CParameters
- DAll of them ✓ Correct answer
✓ Correct answer: All of them
Full explanation
All of them. When a function is called, the stack stores its return address, its local variables and its parameters, so execution can resume correctly when the function returns.
ProgrammingC Programming BPSCID: BPP-898
Most convenient loop to use when working with 2D arrays?
- ADo while
- BFor ✓ Correct answer
- CWhile
- DAll of them
✓ Correct answer: For
Full explanation
For. Nested for loops are the most convenient way to iterate over the rows and columns of a 2D array, since the sizes are known in advance and indexing is clear.
ProgrammingC Programming BPSCID: BPP-899
When the number of iterations are not known in advance which loop is most suitable?
- ADo while
- BFor
- CWhile ✓ Correct answer
- DAll of them
✓ Correct answer: While
Full explanation
While. A while loop is most suitable when the number of iterations is not known in advance, because it repeats only while a condition holds true.
ProgrammingC Programming BPSCID: BPP-900
Which branching statement can easily handle complicated nested decisions?
- ASwitch ✓ Correct answer
- BIf else
- CElse if
- DAll of them
✓ Correct answer: Switch
Full explanation
Switch. A switch statement handles many discrete values of a single variable more clearly than deeply nested if-else chains, improving readability in complicated decisions.
ProgrammingC Programming BPSCID: BPP-901
Which of the following is not a standard builtin data type in C? Bool, Long, Int, Char
- ABool ✓ Correct answer
- BLong
- CInt
- DChar
✓ Correct answer: Bool
Full explanation
Bool. Standard C before C99 had no built-in bool type; C99 introduced _Bool, with bool available through <stdbool.h>. int, long and char are standard primitive data types in C.
ProgrammingC Programming BPSCID: BPP-903
Data type int occupies 4 bytes in memory, writing unsigned before int increases its ______?
- ARange ✓ Correct answer
- BSize
- CBoth A and B
- DNone of them
✓ Correct answer: Range
Full explanation
Range. Writing unsigned before int increases its range: it shifts from -2^31 to 2^31-1 to 0 to 2^32-1, since no values are spent on negatives, while the size stays 4 bytes.
ProgrammingData Structures & Algorithms BPSCID: BPP-904
What is the time complexity of inserting an element in a binary heap?
- AO(n log n)
- BO(1)
- CO(log n) ✓ Correct answer
- DNone of these
✓ Correct answer: O(log n)
Full explanation
O(log n). Inserting into a binary heap adds the element at the end and then heapifies up to restore the heap property, which takes logarithmic time in the number of elements.
ProgrammingData Structures & Algorithms BPSCID: BPP-905
Which algorithm is used to find the shortest path in a graph?
- ADecision Tree
- BDijkstra's Algorithm ✓ Correct answer
- CK-Nearest Neighbors
- DNone of these
✓ Correct answer: Dijkstra's Algorithm
Full explanation
Dijkstra's Algorithm. Dijkstra's algorithm finds the shortest path between nodes in a weighted graph by repeatedly selecting the closest unvisited node and updating shortest-path estimates.
ProgrammingData Structures & Algorithms BPSCID: BPP-906
Which of the following data structures does not allow duplicate elements?
- ALinked List
- BStack
- CHash Set ✓ Correct answer
- DNone of these
✓ Correct answer: Hash Set
Full explanation
Hash Set. A hash set stores only unique elements and automatically ignores duplicates, while linked lists and stacks allow duplicates.
ProgrammingData Structures & Algorithms BPSCID: BPP-907
Which of the following is a self-balancing binary search tree?
- AAVL Tree ✓ Correct answer
- BBinary Heap
- CHash Table
- DNone of these
✓ Correct answer: AVL Tree
Full explanation
AVL Tree. An AVL tree is a self-balancing binary search tree in which the heights of the left and right subtrees differ by at most one, keeping search at O(log n).
ProgrammingData Structures & Algorithms BPSCID: BPP-908
Which data structure is best for implementing a priority queue?
- AHash Table
- BHeap ✓ Correct answer
- CStack
- DNone of these
✓ Correct answer: Heap
Full explanation
Heap. A heap is the best structure for a priority queue because it supports insertion and extraction of the highest (or lowest) priority element efficiently, in O(log n) time.
ProgrammingData Structures & Algorithms BPSCID: BPP-909
Which data structure provides constant-time lookup using keys?
- AHash Table ✓ Correct answer
- BArray
- CStack
- DNone of these
✓ Correct answer: Hash Table
Full explanation
Hash Table. A hash table maps keys to indices with a hash function, giving constant-time O(1) average lookup.
ProgrammingData Structures & Algorithms BPSCID: BPP-910
A Queue follows which of the following principle?
- AFIFO ✓ Correct answer
- BLIFO
- CSJF
- DNone of them
✓ Correct answer: FIFO
Full explanation
FIFO. A queue follows the First In, First Out (FIFO) principle: the first element added is the first to be removed.
ProgrammingData Structures & Algorithms BPSCID: BPP-3688
In a binary tree, a node with no children is called?
- ARoot node
- BLeaf node ✓ Correct answer
- CParent node
- DInternal node
✓ Correct answer: Leaf node
Full explanation
The correct answer is Leaf node. A leaf node is a node in a tree that has no children.
ProgrammingData Structures & Algorithms BPSCID: BPP-3689
Which sorting algorithm has an average-case time complexity of O(n log n)?
- ABubble sort
- BInsertion sort
- CQuick sort ✓ Correct answer
- DSelection sort
✓ Correct answer: Quick sort
Full explanation
Quick sort has an average-case time complexity of O(n log n), while bubble, insertion and selection sort are O(n²).
ProgrammingData Structures & Algorithms BPSCID: BPP-3690
A hash table resolves collisions by which technique?
- AChaining ✓ Correct answer
- BLinear search
- CBinary search
- DRecursion
✓ Correct answer: Chaining
Full explanation
Chaining resolves hash collisions by storing all elements that hash to the same slot in a linked list at that slot.
ProgrammingC++ Programming BPSCID: BPP-3691
Which keyword is used to define a class in C++?
- Astruct
- Bobject
- Cclass ✓ Correct answer
- Ddefine
✓ Correct answer: class
Full explanation
A class in C++ is defined with the class keyword, followed by the class name and the member declarations.
ProgrammingC++ Programming BPSCID: BPP-3692
In C++, the operator used to access a member through a pointer is?
- A.
- B&
- C::
- D-> ✓ Correct answer
✓ Correct answer: ->
Full explanation
The arrow operator -> is used to access a member of an object through a pointer to that object.
ProgrammingC++ Programming BPSCID: BPP-3693
Which concept in C++ allows a function to have the same name with different parameters?
- AFunction overloading ✓ Correct answer
- BFunction overriding
- CInheritance
- DEncapsulation
✓ Correct answer: Function overloading
Full explanation
Function overloading allows several functions with the same name but different parameter lists to exist in C++.
ProgrammingC++ Programming BPSCID: BPP-3694
The destructor of a class in C++ is identified by which symbol before its name?
- A#
- B@
- C~ ✓ Correct answer
- D$
✓ Correct answer: ~
Full explanation
A destructor in C++ has the same name as the class, preceded by the tilde symbol ~.
ProgrammingC Programming BPSCID: BPP-3696
The size of an int variable in C on a typical 32-bit system is?
- A2 bytes
- B4 bytes ✓ Correct answer
- C8 bytes
- D1 byte
✓ Correct answer: 4 bytes
Full explanation
On a typical 32-bit system, an int occupies 4 bytes of memory.
ProgrammingC Programming BPSCID: BPP-3697
Which loop in C checks the condition after executing the body at least once?
- Ado-while loop ✓ Correct answer
- Bwhile loop
- Cfor loop
- Dnested for loop
✓ Correct answer: do-while loop
Full explanation
The do-while loop executes its body first and then checks the condition, so it runs at least once.
ProgrammingC Programming BPSCID: BPP-3698
In C, the value of the expression 5 % 3 is?
- A2 ✓ Correct answer
- B1
- C0
- D3
✓ Correct answer: 2
Full explanation
The modulus operator gives the remainder: 5 % 3 = 2.
MathematicsNumber System BPSCID: BPP-855
What is the result of (13 × 17) mod 5?
- A3
- B2
- C1 ✓ Correct answer
- DNone of these
✓ Correct answer: 1
Full explanation
1. (13 x 17) = 221, and 221 mod 5 = 1. Equivalently, 13 mod 5 = 3 and 17 mod 5 = 2, so (13 x 17) mod 5 = (3 x 2) mod 5 = 6 mod 5 = 1.
MathematicsProgressions BPSCID: BPP-856
If a geometric sequence has first term 3 and common ratio 2, what is the 5th term?
- A12
- B24
- C48 ✓ Correct answer
- DNone of these
✓ Correct answer: 48
Full explanation
48. In a geometric sequence the nth term is a x r^(n-1). Here a = 3 and r = 2, so the 5th term is 3 x 2^4 = 3 x 16 = 48 (the terms are 3, 6, 12, 24, 48).
MathematicsPermutation and Combination BPSCID: BPP-857
How many ways can you choose 2 elements from a set of 5?
- A25
- B5
- C10 ✓ Correct answer
- DNone of these
✓ Correct answer: 10
Full explanation
10. The number of ways to choose 2 elements from 5 is 5C2 = 5! / (2! x 3!) = 10, since order does not matter in a combination.
MathematicsPermutation and Combination BPSCID: BPP-858
How many ways can you arrange 4 distinct books on a shelf?
- A256
- B16
- C24 ✓ Correct answer
- DNone of these
✓ Correct answer: 24
Full explanation
24. The number of arrangements of 4 distinct books is 4! = 4 x 3 x 2 x 1 = 24.
MathematicsAlgebra BPSCID: BPP-861
Which of the following is an equivalence relation? Transitive, Reflexive, Symmetric, All of them
- ATransitive
- BReflexive
- CSymmetric
- DAll of them ✓ Correct answer
✓ Correct answer: All of them
Full explanation
All of them. An equivalence relation must be reflexive, symmetric and transitive; all three properties together define equivalence among elements of a set.
MathematicsAlgebra BPSCID: BPP-862
Which of the following is a reflexive relation? (1,2), (2,3) (1,1), (2,2), (3,3) (1,2), (2,1) All of them
- A(1,2), (2,3)
- B(1,1), (2,2), (3,3) ✓ Correct answer
- C(1,2), (2,1)
- DAll of them
✓ Correct answer: (1,1), (2,2), (3,3)
Full explanation
(1,1), (2,2), (3,3). A relation is reflexive if every element is related to itself, so on the set {1, 2, 3} only (1,1), (2,2), (3,3) satisfies the condition.
MathematicsSets & Logic BPSCID: BPP-863
Which logical operator represents "AND"?
- A~
- BV
- CA
- D& ✓ Correct answer
✓ Correct answer: &
Full explanation
&. The & operator represents logical AND, returning true only if both operands are true; ~ represents NOT and V (OR) represents logical OR.
MathematicsSets & Logic BPSCID: BPP-864
Which of the following is a proposition? What time is it?, 2 + 2, X + 5 = 10, Today is Monday
- AWhat time is it?
- B2 + 2
- CX + 5 = 10
- DToday is Monday ✓ Correct answer
✓ Correct answer: Today is Monday
Full explanation
Today is Monday. A proposition is a declarative statement that is either true or false. 'Today is Monday' can be evaluated as true or false, while a question ('What time is it?'), an expression ('2 + 2') and an open formula ('X + 5 = 10') cannot.
MathematicsAlgebra BPSCID: BPP-3711
If x + y = 10 and x − y = 4, what is the value of x?
- A3
- B6
- C5
- D7 ✓ Correct answer
✓ Correct answer: 7
Full explanation
Adding the two equations gives 2x = 14, so x = 7.
MathematicsSimplification BPSCID: BPP-3712
Evaluate 2³ × 2².
- A32 ✓ Correct answer
- B16
- C64
- D10
✓ Correct answer: 32
Full explanation
2³ × 2² = 2⁵ = 32.
MathematicsPermutation and Combination BPSCID: BPP-3715
In how many ways can 3 books be arranged on a shelf?
- A3
- B6 ✓ Correct answer
- C9
- D27
✓ Correct answer: 6
Full explanation
Three books can be arranged in 3! = 3 × 2 × 1 = 6 ways.