Showing 2301–2320 of 4795

Q2301.Why do responsive layouts follow a mobile-first approach?

Easy
A Mobile devices are slower
B Ensures optimal display on small screens before scaling up
C Desktop always loads first
D Reduces CSS file size
General MCQs PPSC

Correct Answer: B

Mobile-first styling ensures functional design on constrained viewports before adding desktop enhancements.

Q2302.Which CSS property is used for stacking order?

Easy
A z-index
B position
C display
D float
General MCQs PPSC

Correct Answer: A

The z-index property determines the three-dimensional layering (stacking order) of positioned elements.

Q2303.Which CSS property is used for rounded corners?

Easy
A Border-radius
B Border-style
C Border-width
D Border-color
General MCQs PPSC

Correct Answer: A

The border-radius property is used in CSS to style rounded corners.

Q2304.Which of the following is correct for a Red-Black Tree?

Easy
A Can have both red or black root node
B Has red root node
C Has black root node
D Root color does not matter
General MCQs PPSC

Correct Answer: C

A Red-Black Tree enforces that the root node must be colored black.

Q2305.Why is max polling helpful?

Easy
A Reduces CPU usage by checking only one device
B Ensures system always reads maximum available data efficiently
C Avoids memory leaks
D Minimizes network traffic
Computer Networks PPSC

Correct Answer: B

Max polling reads the maximum available buffered I/O data in a single cycle, reducing execution overhead.

Q2306.Which usability heuristic focuses on system recovery from user mistakes?

Easy
A Match between system and real world
B User control and freedom
C Consistency and standards
D Aesthetic and minimalist design
Computer Basics PPSC

Correct Answer: B

User control and freedom provides features like Undo and Redo to help users gracefully recover from errors.

Q2307.What happens if a single interface contains too many unrelated methods?

Easy
A Easier to implement
B Violates interface segregation principle
C Improves performance
D No effect
General MCQs PPSC

Correct Answer: B

The Interface Segregation Principle (ISP) states that clients shouldn't be forced to depend on methods they do not use.

Q2308.How does Floyd–Warshall handle negative edge weights?

Easy
A Ignores negative edges
B Finds shortest paths even with negative edges
C Converts negative edges to zero
D Throws an error
General MCQs PPSC

Correct Answer: B

The Floyd–Warshall algorithm computes shortest paths between all pairs of vertices. It supports negative edge weights, as long as there are no negative cycles.

Q2309.What is the use of templates in C++?

Easy
A Optimization
B Reduce memory loss
C Code reusability (generic programming)
D Memory allocation
Computer Terminology PPSC

Correct Answer: C

Templates enable generic programming, allowing the same code logic to be reused for multiple datatypes.

Q2310.Which language is used for server-side rendering?

Easy
A HTML
B CSS
C Python
D JavaScript
Computer Terminology PPSC

Correct Answer: C

Python, using frameworks like Django or Flask, is a server-side language frequently used for SSR.

Q2311.What is the main purpose of a namespace in C++?

Easy
A To store variables
B To group identifiers and avoid name conflicts
C To create new functions
D To allocate memory
Computer Terminology PPSC

Correct Answer: B

Namespaces group entities and prevent identifier name collisions in large codebases.

Q2312.In SQL, which command is used to remove all rows from a table without deleting the table structure?

Easy
A DELETE
B DROP
C TRUNCATE
D REMOVE
Computer Terminology PPSC

Correct Answer: C

The TRUNCATE command rapidly deletes all rows in a table without logging individual deletions, preserving structure.

Q2313.You want to distinguish roads, mountains, and houses in satellite imagery. Which technique is most appropriate?

Easy
A Image classification
B Object detection
C Image filtering
D Edge enhancement
Computer Networks PPSC

Correct Answer: A

Image classification groups pixels or regional grids into semantic categories like terrain, structures, or roads.

Q2314.Reducing false negatives in a classification task usually results in?

Easy
A Higher true positives
B Lower true positives
C Higher false positives
D No effect on model performance
General MCQs PPSC

Correct Answer: C

Tuning a classifier to minimize false negatives (misses) usually shifts the decision boundary, increasing false positives.

Q2315.What is the main purpose of software documentation?

Easy
A To write code faster
B To provide guidance for users and developers
C To compile the program
D To secure software
Computer Basics PPSC

Correct Answer: B

Documentation provides comprehensive instructions, requirements, and guides for users and developers.

Q2316.Which SDLC model is best for projects with clearly defined requirements and little expected change?

Easy
A Agile
B Waterfall
C Spiral
D Incremental
General MCQs PPSC

Correct Answer: B

The classical Waterfall model is a rigid, sequential life cycle ideal for well-understood projects with fixed requirements.

Q2317.Which algorithm is used for symmetric encryption?

Easy
A RSA
B AES
C SHA-256
D Diffie-Hellman
Computer Terminology PPSC

Correct Answer: B

AES (Advanced Encryption Standard) is a symmetric encryption algorithm. Symmetric encryption uses the same key for encryption and decryption. RSA and Diffie-Hellman are asymmetric algorithms using public/private keys. SHA-256 is a hash function, not an encryption algorithm.

Q2318.Which principle ensures that data is not altered by unauthorized users?

Easy
A Confidentiality
B Integrity
C Availability
D Authentication
General MCQs PPSC

Correct Answer: B

Integrity ensures that data is accurate and unaltered. It protects against unauthorized modifications or tampering.

Q2319.console.log([] + [])

Easy
A Undefined
B Empty string ("")
C []
D 0
General MCQs PPSC

Correct Answer: B

In JavaScript, the + operator performs string concatenation if any operand is a string. [] (an empty array) is converted to an empty string when used with +. So [] + [] becomes "" + "" -> "" (empty string). This is due to type coercion in JavaScript. The result is not undefined, [], or 0—it's an empty string.

Q2320.console.log([..."hello"])

Easy
A 'hello'
B Undefined
C ['h', 'e', 'l', 'l', 'o']
D 'lo'
General MCQs PPSC

Correct Answer: C

The spread operator ... in JavaScript expands iterable objects like strings or arrays. "hello" is a string, which is iterable. [..."hello"] spreads each character into a new array. Resulting array: ['h', 'e', 'l', 'l', 'o']. It is not a single string or 'lo', and definitely not undefined.