Showing 2681–2700 of 4795

Q2681.Data type int occupies 4 bytes in memory, writing unsigned before int increases its ______?

Easy
A Range
B Size
C Both A and B
D None of them
Computer Basics PPSC

Correct Answer: A

Declaring an integer as 'unsigned' does not change its memory size (4 bytes), but shifts and increases its positive numeric range from ~2 billion to ~4.29 billion.

Q2682.What is the time complexity of inserting an element in a binary heap?

Easy
A O(n log n)
B O(1)
C O(log n)
D None of these
General MCQs PPSC

Correct Answer: C

Inserting an element in a binary heap involves appending it to the end and heapifying it up along the height of the tree, which takes logarithmic O(log n) time.

Q2683.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
Computer Terminology PPSC

Correct Answer: B

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

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

Easy
A Linked List
B Stack
C Hash Set
D None of these
Computer Terminology PPSC

Correct Answer: C

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

Q2685.Which of the following is a self-balancing binary search tree?

Easy
A AVL Tree
B Binary Heap
C Hash Table
D None of these
Computer Networks PPSC

Correct Answer: A

An AVL Tree is a self-balancing binary search tree where the height difference of any node's left and right subtrees is capped at 1, keeping search time at O(log n).

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

Easy
A Hash Table
B Heap
C Stack
D None of these
Computer Terminology 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.

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

Easy
A Hash Table
B Array
C Stack
D None of these
Computer Terminology 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.

Q2688.A Queue follows which of the following principle?

Easy
A FIFO
B LIFO
C SJF
D None of them
General MCQs PPSC

Correct Answer: A

A queue is a linear data structure that operates strictly on the FIFO (First In, First Out) processing principle.

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

Easy
A ERD
B Flowchart
C Data flow
D None of these
Computer Terminology PPSC

Correct Answer: A

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

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

Easy
A Trigger
B Index
C View
D None of these
Computer Terminology 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.

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

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

Correct Answer: A

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

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

Easy
A Function
B Index
C Trigger
D None of these
Computer Terminology 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.

Q2693.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
Computer Terminology PPSC

Correct Answer: B

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

Q2694.Which SQL aggregate function ignores NULL values?

Easy
A Max()
B Sum()
C Avg()
D All of them
Computer Terminology PPSC

Correct Answer: D

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

Q2695.Which locking strategy is most effective at minimizing the occurrence of deadlocks?

Easy
A Exclusive
B Pessimistic
C Optimistic
D None of these
General MCQs PPSC

Correct Answer: C

Optimistic locking minimizes database locks and transaction holding times, vastly reducing the likelihood of deadlocks compared to pessimistic locking.

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

Easy
A Neo4j
B MongoDB
C Cassandra
D None of these
Computer Terminology PPSC

Correct Answer: C

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

Q2697.A clustered index primarily affects _____?

Easy
A Data backups
B Query speed only
C Physical data order
D None of these
Computer Terminology PPSC

Correct Answer: C

A clustered index directly defines the physical storage order of rows in a database table, so a table can have only one clustered index.

Q2698.Which normalization form addresses transitive dependencies?

Easy
A 1NF
B 2NF
C 3NF
D None of these
General MCQs PPSC

Correct Answer: C

Third Normal Form (3NF) eliminates transitive functional dependencies, ensuring all non-key fields depend directly and solely on the primary key.

Q2699.Which is a disadvantage of vector data?

Easy
A Not suitable for network analysis
B Poor thematic detail
C Large file size for complex geometry
D None of these
Computer Networks PPSC

Correct Answer: C

In GIS, highly detailed and complex geometries in vector data can result in massive file sizes, slowing storage and computation.

Q2700.GIS layering allows _____?

Easy
A Run macros
B Add music
C Overlay multiple datasets
D None of these
General MCQs PPSC

Correct Answer: C

GIS layering allows users to combine and overlay multiple independent spatial datasets (like elevation, vegetation, and roads) on top of each other.