Computer — All MCQs
4795 questions available
Q2681.Data type int occupies 4 bytes in memory, writing unsigned before int increases its ______?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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?
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 _____?
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?
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?
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 _____?
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.