Showing 281–300 of 603

Q281.Which scheduling algorithm is most prone to starvation?

Easy
A FCFS
B Round Robin
C Shortest Job Next
D None of these
Programming Basics PPSC

Correct Answer: C

Shortest Job Next (SJN or SJF) is highly prone to starvation because long-running tasks can be indefinitely postponed if shorter tasks keep arriving.

Q282.Which algorithm is used for deadlock detection?

Easy
A LRU
B Banker's Algorithm
C FIFO
D None of these
Programming Basics PPSC

Correct Answer: B

The Banker's Algorithm is a resource allocation and deadlock avoidance/detection algorithm that simulates safe system states.

Q283.In which type of operating system is response time critical?

Easy
A Multi tasking
B Real time
C Batch processing
D None of these
Operating Systems PPSC

Correct Answer: B

A Real-Time Operating System (RTOS) is designed to guarantee responses within extremely strict, critical time constraints.

Q284.Which type of operating system has a very limited user interface?

Easy
A Multi tasking
B Real time
C Batch processing
D Embedded
Operating Systems PPSC

Correct Answer: D

Embedded operating systems are built for specific microcontroller or appliance hardware, typically offering very minimal or no user interface.

Q285.The software that contains the core components of the operating system is called _____?

Easy
A Middle
B Function
C Component
D Kernel
Operating Systems PPSC

Correct Answer: D

The kernel is the core segment of an operating system, directly managing system hardware resources, memory, and task execution.

Q286.Where is dynamically allocated memory stored?

Easy
A Array
B Stack
C Heap
D None of these
Programming Basics PPSC

Correct Answer: C

Dynamically allocated memory (requested via malloc/new) is stored on the system Heap, which persists independently of function scopes.

Q287.Stack memory stores which of the following when a function is called _____?

Easy
A Return addresses
B Local variables
C Parameters
D All of them
Programming Basics PPSC

Correct Answer: D

When a function is called, a stack frame is pushed to store the return execution address, local variables, and input function arguments.

Q288.Most convenient loop to use when working with 2D arrays?

Easy
A Do while
B For
C While
D All of them
Programming Basics PPSC

Correct Answer: B

For loops are highly convenient for working with multi-dimensional data structures since nested for loops align cleanly with row and column indexing.

Q289.When the number of iterations are not known in advance which loop is most suitable?

Easy
A Do while
B For
C While
D All of them
Database Basics PPSC

Correct Answer: C

A while loop is designed to continue execution based on an active conditional check, making it ideal when iteration counts are not known beforehand.

Q290.Which algorithm is used to find the shortest path in a graph?

Easy
A Decision Tree
B Dijkstra's Algorithm
C K-Nearest Neighbors
D None of these
Programming Basics PPSC

Correct Answer: B

Dijkstra's Algorithm is a classic single-source shortest path algorithm used on weighted, non-negative graphs.

Q291.Which of the following data structures does not allow duplicate elements?

Easy
A Linked List
B Stack
C Hash Set
D None of these
Programming Basics PPSC

Correct Answer: C

A Hash Set is an associative mathematical container that stores unique elements only, automatically ignoring or rejecting duplicate insertions.

Q292.Which data structure is best for implementing a priority queue?

Easy
A Hash Table
B Heap
C Stack
D None of these
Database Basics PPSC

Correct Answer: B

A binary heap is the ideal data structure for a priority queue, as it supports efficient O(log n) insertion and extraction of the extreme priority element.

Q293.Which data structure provides constant-time lookup using keys?

Easy
A Hash Table
B Array
C Stack
D None of these
Database Basics PPSC

Correct Answer: A

A Hash Table maps keys directly to array buckets using a hash function, providing extremely fast average O(1) constant-time lookups.

Q294.Which diagram is primarily used for designing database’s logical schema?

Easy
A ERD
B Flowchart
C Data flow
D None of these
Database Basics PPSC

Correct Answer: A

ERD (Entity-Relationship Diagram) represents entities, attributes, and relationships, serving as the blueprint for database logical schema design.

Q295.Which of the following refers to virtual table based on a query?

Easy
A Trigger
B Index
C View
D None of these
Database Basics PPSC

Correct Answer: C

A database view is a virtual table that does not contain actual physical data, dynamically displaying the results of an underlying SQL query.

Q296.What term describes the logical structure of a database?

Easy
A Database schema
B Data instance
C Data file
D None of these
Database Basics PPSC

Correct Answer: A

The database schema defines the logical blueprint, tables, constraints, fields, and relationships in a structured database.

Q297.Which database object is automatically executed in response to specific events?

Easy
A Function
B Index
C Trigger
D None of these
Database Basics PPSC

Correct Answer: C

A database trigger is a specialized procedure that executes automatically in response to DML operations (INSERT, UPDATE, or DELETE) on a table.

Q298.Which of the following enhances query performance by dividing large tables into smaller ones?

Easy
A Replication
B Partitioning
C Normalization
D None of these
Database Basics PPSC

Correct Answer: B

Database partitioning physically splits large database tables into smaller, highly performant logical segments while keeping a single unified table interface.

Q299.Which SQL aggregate function ignores NULL values?

Easy
A Max()
B Sum()
C Avg()
D All of them
Database Basics PPSC

Correct Answer: D

Standard SQL aggregate functions (like MAX, SUM, MIN, and AVG) automatically ignore NULL values during evaluations; only COUNT(*) includes them.

Q300.Which of the following is an example of a column-oriented NoSQL database?

Easy
A Neo4j
B MongoDB
C Cassandra
D None of these
Database Basics PPSC

Correct Answer: C

Apache Cassandra is a distributed, wide-column oriented NoSQL database designed to handle massive amounts of data across commodity servers.