ASoE/Chapter 7/Read MCQs
๐Ÿ“– Back to Study Notes
7

Chapter 7 ยท MCQ Read Mode

Data Structures and Algorithm, Database System and Operating System

ACTE07ยท72 Total MCQs
Question 1 of 72Data Structures, Lists, Linked Lists & Trees

A stack follows which principle?

AFIFO
BLIFO
CRandom
DPriority
Answer is hidden
Question 2 of 72Data Structures, Lists, Linked Lists & Trees

A queue follows which principle?

ALIFO
BFIFO
CLILO
DRandom
Answer is hidden
Question 3 of 72Data Structures, Lists, Linked Lists & Trees

Which traversal of a Binary Search Tree gives elements in sorted order?

APre-order
BIn-order
CPost-order
DLevel-order
Answer is hidden
Question 4 of 72Data Structures, Lists, Linked Lists & Trees

Big-O notation describes the ____ of an algorithm.

ABest case
BWorst-case upper bound
CExact memory usage
DSource code length
Answer is hidden
Question 5 of 72Data Structures, Lists, Linked Lists & Trees

In a doubly linked list, each node has:

AOne pointer (to next)
BTwo pointers (to next and previous)
CNo pointers
DThree data fields
Answer is hidden
Question 6 of 72Data Structures, Lists, Linked Lists & Trees

An AVL tree is a:

ASelf-balancing binary search tree
BLinked list
CHash table
DStack
Answer is hidden
Question 7 of 72Data Structures, Lists, Linked Lists & Trees

The postfix expression for (A + B) is:

A+AB
BAB+
CA+B
DBA+
Answer is hidden
Question 8 of 72Data Structures, Lists, Linked Lists & Trees

Stacks are commonly used to evaluate:

AInfix expressions directly
BPostfix expressions
CSQL queries
DGraphs
Answer is hidden
Question 9 of 72Data Structures, Lists, Linked Lists & Trees

In a Binary Search Tree, for any node, the left child is:

AGreater than the node
BLess than the node
CEqual to the node
DUnrelated to the node
Answer is hidden
Question 10 of 72Data Structures, Lists, Linked Lists & Trees

Which data structure provides O(1) random access by index?

ALinked list
BArray
CBinary tree
DQueue
Answer is hidden
Question 11 of 72Sorting, Searching & Graphs

The average time complexity of merge sort is:

AO(n)
BO(nยฒ)
CO(n log n)
DO(log n)
Answer is hidden
Question 12 of 72Sorting, Searching & Graphs

Binary search requires the data to be:

AUnsorted
BSorted
CStored as a linked list
DHashed
Answer is hidden
Question 13 of 72Sorting, Searching & Graphs

BFS (Breadth-First Search) is implemented using a:

AStack
BQueue
CTree
DHeap
Answer is hidden
Question 14 of 72Sorting, Searching & Graphs

DFS (Depth-First Search) typically uses a:

AQueue
BStack or recursion
CHash table
DPriority queue
Answer is hidden
Question 15 of 72Sorting, Searching & Graphs

Which algorithm finds the shortest path from a source in a weighted graph with non-negative weights?

AKruskal's algorithm
BDijkstra's algorithm
CBubble sort
DWarshall's algorithm
Answer is hidden
Question 16 of 72Sorting, Searching & Graphs

Prim's and Kruskal's algorithms are used to find a:

AShortest path
BMinimum spanning tree
CHash table
DSorted list
Answer is hidden
Question 17 of 72Sorting, Searching & Graphs

The average-case time complexity of a well-designed hash table lookup is:

AO(n)
BO(log n)
CO(1)
DO(nยฒ)
Answer is hidden
Question 18 of 72Sorting, Searching & Graphs

When two keys map to the same hash index, it is called a:

AHit
BCollision
COverflow
DFault
Answer is hidden
Question 19 of 72Sorting, Searching & Graphs

The worst-case time complexity of quick sort is:

AO(n log n)
BO(n)
CO(nยฒ)
DO(log n)
Answer is hidden
Question 20 of 72Sorting, Searching & Graphs

Topological sorting can be applied only to a:

ACyclic graph
BDirected acyclic graph (DAG)
CComplete undirected graph
DUndirected graph
Answer is hidden
Question 21 of 72Data Models, Normalization & SQL

A key that uniquely identifies each row and cannot be NULL is the:

AForeign key
BPrimary key
CSuper key
DCandidate key
Answer is hidden
Question 22 of 72Data Models, Normalization & SQL

Which normal form removes transitive dependencies?

A1NF
B2NF
C3NF
D0NF
Answer is hidden
Question 23 of 72Data Models, Normalization & SQL

The SQL command SELECT belongs to which category?

ADDL
BDML
CDCL
DTCL
Answer is hidden
Question 24 of 72Data Models, Normalization & SQL

CREATE, ALTER, and DROP are examples of:

ADML
BDDL
CDCL
DTCL
Answer is hidden
Question 25 of 72Data Models, Normalization & SQL

A foreign key is used to:

AUniquely identify a row in the same table
BReference the primary key of another table
CSort data in ascending order
DEncrypt sensitive data
Answer is hidden
Question 26 of 72Data Models, Normalization & SQL

A table is in 1NF if all its attribute values are:

AComposite and multi-valued
BAtomic (indivisible)
CEncrypted
DForeign keys
Answer is hidden
Question 27 of 72Data Models, Normalization & SQL

An entity that cannot be uniquely identified by its own attributes is a:

AStrong entity
BWeak entity
CSuper entity
DPrimary entity
Answer is hidden
Question 28 of 72Data Models, Normalization & SQL

A virtual table derived from a query is called a:

AIndex
BView
CTrigger
DSchema
Answer is hidden
Question 29 of 72Data Models, Normalization & SQL

GRANT and REVOKE are part of which SQL category?

ADDL
BDML
CDCL
DTCL
Answer is hidden
Question 30 of 72Data Models, Normalization & SQL

In BCNF, every determinant must be a:

AForeign key
BCandidate key
CComposite attribute
DNULL value
Answer is hidden
Question 31 of 72Transaction Processing, Concurrency & Recovery

The ACID properties of a transaction are:

AAtomicity, Consistency, Isolation, Durability
BAccess, Control, Integrity, Data
CAdd, Copy, Insert, Delete
DAtomic, Concurrent, Indexed, Distributed
Answer is hidden
Question 32 of 72Transaction Processing, Concurrency & Recovery

The 'all-or-nothing' property of a transaction is:

AConsistency
BAtomicity
CIsolation
DDurability
Answer is hidden
Question 33 of 72Transaction Processing, Concurrency & Recovery

Once a transaction commits, its changes persist even after a crash. This is:

AAtomicity
BIsolation
CDurability
DConsistency
Answer is hidden
Question 34 of 72Transaction Processing, Concurrency & Recovery

Two-Phase Locking (2PL) is used to ensure:

ADeadlock prevention
BSerializability
CData redundancy
DEncryption
Answer is hidden
Question 35 of 72Transaction Processing, Concurrency & Recovery

A situation where two transactions wait indefinitely for each other's locks is:

AStarvation
BDeadlock
CRollback
DCheckpoint
Answer is hidden
Question 36 of 72Transaction Processing, Concurrency & Recovery

In log-based recovery, reapplying committed transactions is called:

AUNDO
BREDO
CCOMMIT
DLOCK
Answer is hidden
Question 37 of 72Transaction Processing, Concurrency & Recovery

Which lock allows multiple transactions to read simultaneously?

AExclusive lock
BShared lock
CWrite lock
DDeadlock
Answer is hidden
Question 38 of 72Transaction Processing, Concurrency & Recovery

A checkpoint in recovery is used to:

AEncrypt the transaction log
BReduce the amount of recovery work needed after a crash
CDelete the entire database
DCreate new indexes automatically
Answer is hidden
Question 39 of 72Transaction Processing, Concurrency & Recovery

Isolation in ACID ensures that:

ATransactions are permanently stored after commit
BConcurrent transactions don't interfere with each other
CData is encrypted during transmission
DAll operations in a transaction complete
Answer is hidden
Question 40 of 72Transaction Processing, Concurrency & Recovery

UNDO operation in recovery is applied to:

ACommitted transactions
BUncommitted (incomplete) transactions
CDatabase indexes
DVirtual views
Answer is hidden
Question 41 of 72Operating System & Process Management

A process is best defined as:

AA stored program on disk
BA program in execution
CA file in the file system
DA CPU register value
Answer is hidden
Question 42 of 72Operating System & Process Management

Which scheduling algorithm is preemptive and uses a time quantum?

AFCFS
BSJF
CRound Robin
DNon-preemptive Priority
Answer is hidden
Question 43 of 72Operating System & Process Management

The core component of an operating system is the:

AShell
BKernel
CCompiler
DDevice driver
Answer is hidden
Question 44 of 72Operating System & Process Management

Which structure stores all information about a process?

AFile Allocation Table
BProcess Control Block (PCB)
CPage table only
DCPU cache
Answer is hidden
Question 45 of 72Operating System & Process Management

A condition where the result depends on the timing of concurrent processes is a:

ADeadlock
BRace condition
CPage fault
DInterrupt
Answer is hidden
Question 46 of 72Operating System & Process Management

A binary semaphore is also called a:

AMonitor
BMutex
CThread
DPipe
Answer is hidden
Question 47 of 72Operating System & Process Management

Which scheduling algorithm gives the minimum average waiting time?

AFCFS
BShortest Job First (SJF)
CRound Robin
DPriority scheduling
Answer is hidden
Question 48 of 72Operating System & Process Management

A lightweight unit of execution that shares memory with others in the same process is a:

AProcess
BThread
CKernel
DDaemon
Answer is hidden
Question 49 of 72Operating System & Process Management

The interface through which a program requests OS services is the:

ACompiler
BSystem call
CSystem bus
DCPU cache
Answer is hidden
Question 50 of 72Operating System & Process Management

The Dining Philosophers problem illustrates issues of:

ASorting algorithms
BSynchronization and deadlock
CData compression
DNetwork routing
Answer is hidden
Question 51 of 72Memory Management, File Systems & Administration

Dividing memory into fixed-size pages and frames is called:

ASegmentation
BPaging
CSwapping
DCompaction
Answer is hidden
Question 52 of 72Memory Management, File Systems & Administration

A page fault occurs when:

AThe CPU fails
BA required page is not in main memory
CThe disk is completely full
DA process terminates
Answer is hidden
Question 53 of 72Memory Management, File Systems & Administration

Which page replacement algorithm replaces the page not used for the longest time?

AFIFO
BLRU
COptimal
DRandom
Answer is hidden
Question 54 of 72Memory Management, File Systems & Administration

Wasted space inside an allocated memory block is called:

AExternal fragmentation
BInternal fragmentation
CSwapping
DThrashing
Answer is hidden
Question 55 of 72Memory Management, File Systems & Administration

Virtual memory is most commonly implemented using:

AMemory compaction
BDemand paging
CData compression
DCPU caching only
Answer is hidden
Question 56 of 72Memory Management, File Systems & Administration

The theoretically optimal page replacement algorithm replaces the page:

AThat was loaded first
BNot needed for the longest future time
CThat was used most recently
DSelected at random
Answer is hidden
Question 57 of 72Memory Management, File Systems & Administration

FIFO page replacement may suffer from:

ADeadlock
BBelady's anomaly
CStarvation
DRace conditions
Answer is hidden
Question 58 of 72Memory Management, File Systems & Administration

Moving a process between main memory and disk is called:

APaging
BSwapping
CHashing
DIndexing
Answer is hidden
Question 59 of 72Memory Management, File Systems & Administration

Which file allocation method stores file blocks in consecutive disk locations?

ALinked allocation
BIndexed allocation
CContiguous allocation
DHashed allocation
Answer is hidden
Question 60 of 72Memory Management, File Systems & Administration

External fragmentation can be reduced by:

AAdding more CPU registers
BCompaction or using paging
CDisabling the CPU cache
DIncreasing the CPU clock speed
Answer is hidden
Question 61 of 72Operating Systems & DBMS

Which entity has its own memory space, program counter, and code segment?

AProcess
BThread
CCoroutine
DInterrupt handler
Answer is hidden
Question 62 of 72Operating Systems & DBMS

An OS that groups similar jobs together for batch execution is a:

AReal-time OS
BTime-sharing OS
CBatch Processing OS
DDistributed OS
Answer is hidden
Question 63 of 72Operating Systems & DBMS

In DBMS, which component is responsible for maintaining concurrency control?

ATransaction Manager
BBuffer Manager
CDisk Manager
DCatalog Manager
Answer is hidden
Question 64 of 72Operating Systems & DBMS

Which DBMS component estimates and minimises the cost of query execution?

AParser
BQuery Optimizer
CBuffer Manager
DCatalog
Answer is hidden
Question 65 of 72Operating Systems & DBMS

A semaphore in OS represents:

AA synchronisation mechanism for shared resources
BA type of scheduling algorithm
CA memory management unit
DA file system structure
Answer is hidden
Question 66 of 72Operating Systems & DBMS

BFS (Breadth-First Search) uses which data structure?

AStack
BQueue
CPriority Queue
DHeap
Answer is hidden
Question 67 of 72Operating Systems & DBMS

DFS (Depth-First Search) uses which data structure (or property)?

AQueue (FIFO)
BStack (LIFO)
CPriority Queue
DHash Table
Answer is hidden
Question 68 of 72Operating Systems & DBMS

For an AVL tree with 7 nodes, what is the maximum possible height?

A2
B3
C4
D7
Answer is hidden
Question 69 of 72Operating Systems & DBMS

Which array correctly represents a min-heap?

A[4, 3, 2, 1]
B[1, 3, 2, 4]
C[3, 1, 2, 4]
D[2, 4, 1, 3]
Answer is hidden
Question 70 of 72Operating Systems & DBMS

The time complexity of the enqueue operation in a queue implemented with a linked list is:

AO(1)
BO(n)
CO(log n)
DO(nยฒ)
Answer is hidden
Question 71 of 72Operating Systems & DBMS

The average time complexity of sequential (linear) search is:

AO(1)
BO(n)
CO(log n)
DO(nยฒ)
Answer is hidden
Question 72 of 72Operating Systems & DBMS

The basic classification of computer memory is:

AVolatile (RAM) and Non-volatile (ROM/Flash)
BPrimary and Secondary
CCache and Main memory
DStatic and Dynamic
Answer is hidden
โ† PREVIOUS CHAPTERCh 3: Programming Language and Its ApplicationsNEXT CHAPTER โ†’Ch 5: Microprocessor, Computer, Organization, and Architecture