Showing 2641–2660 of 4795

Q2641.Which logical operator represents "AND"?

Easy
A ~
B V
C A
D &
General MCQs PPSC

Correct Answer: D

The ampersand symbol ('&') is the standard programming representation for the logical AND operation, returning true only if both conditions are met.

Q2642.Which of the following is a proposition?

Easy
A What time is it?
B 2 + 2
C X + 5 = 10
D Today is Monday
General MCQs PPSC

Correct Answer: D

A proposition is a declarative statement that is deterministically either True or False; 'Today is Monday' is a clear proposition.

Q2643.Which term is used to write an object to disk?

Easy
A Tokenization
B Serialization
C De-serialization
D None of these
General MCQs PPSC

Correct Answer: B

Serialization is the programmatic process of converting an in-memory object's state into a byte stream to store it on disk or transmit it across a network.

Q2644.How is dynamically allocated memory de allocated in C++?

Easy
A Using erase()
B Automatically
C Using delete
D None of these
Computer Terminology PPSC

Correct Answer: C

In C++, heap memory dynamically requested using the 'new' keyword must be explicitly freed using the 'delete' keyword to prevent memory leaks.

Q2645.Which catch block should be written first when handling multiple exceptions?

Easy
A Order Irrelevant
B General
C Specific
D None of these
General MCQs PPSC

Correct Answer: C

In exception handling structures, specific subclass exception catch blocks must always be placed before general base class catch blocks to prevent shadowing.

Q2646.Which keyword is used to define an exception block?

Easy
A Finally
B Catch
C Try
D Throw
General MCQs PPSC

Correct Answer: C

The 'try' keyword defines an exception block, enclosing the code block that is actively monitored for runtime exceptions.

Q2647.When overriding function which of following should be the same in base and derived class?

Easy
A Function name
B Return type
C Both A and B
D Parameter list
Computer Basics PPSC

Correct Answer: C

In object-oriented function overriding, both the function name and its return type must remain identical between the base and derived classes.

Q2648.When overloading functions which of the following must be different?

Easy
A Function name
B Return type
C Both A and B
D Parameter list
Computer Basics PPSC

Correct Answer: D

Function overloading requires multiple functions to share the exact same name but have distinct parameter lists (differing in argument type or count).

Q2649.When overloading functions which of the following should be the same?

Easy
A Function name
B Return type
C Both A and B
D Parameter list
Computer Basics PPSC

Correct Answer: A

The defining characteristic of overloaded functions is that they share the exact same function name.

Q2650.Which feature simplifies complexity by emphasizing high-level design?

Easy
A Polymorphism
B Abstraction
C Inheritance
D All of them
General MCQs PPSC

Correct Answer: B

Abstraction reduces operational complexity by hiding background implementation details and exposing only high-level conceptual designs.

Q2651.Feature which enables objects of different classes to respond differently to the same message?

Easy
A Polymorphism
B Abstraction
C Inheritance
D All of them
General MCQs PPSC

Correct Answer: A

Polymorphism allows objects of disparate child classes to interpret and respond to the same interface or function call in their own unique ways.

Q2652.Which of the following deals with protecting an object's internal data by controlling access?

Easy
A Polymorphism
B Encapsulation
C Inheritance
D All of them
General MCQs PPSC

Correct Answer: B

Encapsulation is the OOP practice of bundling data and methods into a single class unit, protecting internal data by using private/public access modifiers.

Q2653.Which scheduling algorithm is least prone to starvation?

Easy
A FCFS
B Round Robin
C Shortest Job Next
D None of these
Computer Terminology PPSC

Correct Answer: A

FCFS (First Come, First Served) executes processes in their exact order of arrival, guaranteeing that every process runs and preventing starvation entirely.

Q2654.Which scheduling algorithm is most prone to starvation?

Easy
A FCFS
B Round Robin
C Shortest Job Next
D None of these
Computer Terminology 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.

Q2655.Which of the following is necessary condition for deadlock?

Easy
A Circular Wait
B Mutual Exclusion
C Hold and Wait
D All of them
General MCQs PPSC

Correct Answer: D

The four necessary Coffman conditions for system deadlocks are Mutual Exclusion, Hold and Wait, No Preemption, and Circular Wait.

Q2656.Which is not a necessary condition for deadlock?

Easy
A Preemption
B Mutual Exclusion
C Hold and Wait
D Circular Wait
General MCQs PPSC

Correct Answer: A

For deadlocks to occur, resources must be non-preemptible ('no preemption'). 'Preemption' actually allows systems to resolve or prevent deadlocks.

Q2657.Which algorithm is used for deadlock detection?

Easy
A LRU
B Banker's Algorithm
C FIFO
D None of these
Computer Terminology PPSC

Correct Answer: B

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

Q2658.Which method ensures mutual exclusion in concurrency control?

Easy
A RAID
B Paging
C Mutex
D None of these
General MCQs PPSC

Correct Answer: C

A mutex (mutual exclusion object) is a synchronization primitive used in concurrent programming to guarantee exclusive access to shared resources.

Q2659.Which scheduling policy gives each process a fixed time slot?

Easy
A Round Robin
B FCFS
C SJF
D None of these
General MCQs PPSC

Correct Answer: A

Round Robin is a preemptive scheduling algorithm that allocates a fixed, cyclic time slice (quantum) to each active process.

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

Easy
A Multi tasking
B Real time
C Batch processing
D None of these
Computer Terminology PPSC

Correct Answer: B

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