Data Structures and Algorithms, DBMS, Operating System
Data Structures and Algorithms, DBMS, Operating System
Question 1: Which data structure is based on the principle of "last in, first out"? a)
Queue b) Stack c) Linked List d) Tree Answer: b) Stack
Question 2: Which algorithm is used to find the shortest path in a weighted graph?
a) Depth-First Search (DFS) b) Breadth-First Search (BFS) c) Dijkstra's algorithm
d) Kruskal's algorithm Answer: c) Dijkstra's algorithm
Question 6: In which type of traversal of a binary tree does the node get visited
after its left and before its right subtree? a) Preorder b) Inorder c) Postorder d)
Level-order Answer: a) Preorder
Question 7: Which search algorithm requires a sorted list for its operation? a)
Linear Search b) Binary Search c) Depth-First Search (DFS) d) Breadth-First
Search (BFS) Answer: b) Binary Search
Question 9: What is the main advantage of using a hash table for data storage?
Question 11: Which data structure allows you to access its elements in constant
time regardless of the size of the collection? a) Linked List b) Stack c) Queue d)
Array Answer: d) Array
a) To divide a problem into smaller subproblems and solve each subproblem only
once b) To perform arithmetic operations efficiently c) To sort data in linear time
d) To find shortest paths in a graph Answer: a) To divide a problem into smaller
subproblems and solve each subproblem only once
Question 13: Which algorithm is used to find the maximum flow in a flow
network? a) Depth-First Search (DFS) b) Breadth-First Search (BFS) c) Dijkstra's
algorithm d) Ford-Fulkerson algorithm Answer: d) Ford-Fulkerson algorithm
Question 14: What is the worst-case time complexity of the Quick Sort algorithm?
a) O(1) b) O(log n) c) O(n) d) O(n^2) Answer: d) O(n^2)
Database Systems:
Question 17: Which term is used to describe a collection of related data entries
that can be organized and accessed in various ways? a) Table b) Query c) Database
d) Schema Answer: c) Database
Question 18: What is a primary key in a relational database? a) A key used for
encryption b) A unique identifier for a table row c) A foreign key in another table
d) A key used for indexing purposes Answer: b) A unique identifier for a table
row
Question 19: Which database model represents data as a collection of documents
in a flexible, semi-structured format? a) Hierarchical model b) Relational model c)
NoSQL model d) Object-oriented model Answer: c) NoSQL model
Question 22: What is SQL used for in the context of database systems? a) Storing
images and multimedia files b) Defining the structure of a database c) Managing
hardware resources d) Manipulating and querying databases Answer: d)
Manipulating and querying databases
Question 24: Which term refers to the process of combining data from multiple
tables in a database to produce a result set? a) Query b) Indexing c) Normalization
d) Aggregation Answer: a) Query
Question 29: Which term refers to the process of making sure that data in a
database remains consistent over time, even as it is updated? a) Data mining b)
Data integrity c) Data warehousing d) Data indexing Answer: b) Data integrity
Operating Systems:
Question 33: What is the main purpose of a file system in an operating system? a)
To manage hardware resources b) To provide security against viruses c) To
manage files and directories d) To run application software Answer: c) To manage
files and directories
Question 37: Which type of operating system allows multiple users to access and
use the same system simultaneously? a) Single-user operating system b) Multi-user
operating system c) Real-time operating system d) Batch operating system
Answer: b) Multi-user operating system
Question 41: Which type of scheduling algorithm selects the process with the
highest priority to execute next? a) Round Robin b) First-Come, First-Served
(FCFS) c) Priority Scheduling d) Shortest Job Next (SJN) Answer: c) Priority
Scheduling
Question 43: In an operating system, what is the role of a supervisor mode (kernel
mode)? a) To provide a user-friendly interface b) To run user applications c) To
execute system-level tasks with unrestricted access to hardware resources d) To
manage files and directories Answer: c) To execute system-level tasks with
unrestricted access to hardware resources
Question 46: Which algorithm is used to find the longest common subsequence
between two sequences? a) Dijkstra's algorithm b) Kruskal's algorithm c) Bellman-
Ford algorithm d) Longest Common Subsequence (LCS) algorithm Answer: d)
Longest Common Subsequence (LCS) algorithm
Question 47: What is the time complexity of the best case for the Quick Sort
algorithm? a) O(1) b) O(log n) c) O(n) d) O(n^2) Answer: c) O(n)
Question 48: In a binary search tree, which traversal visits the nodes in ascending
order? a) Preorder b) Inorder c) Postorder d) Level-order Answer: b) Inorder
Question 49: Which algorithm is used to find the shortest paths between all pairs
of vertices in a weighted graph? a) Depth-First Search (DFS) b) Breadth-First
Search (BFS) c) Dijkstra's algorithm d) Floyd-Warshall algorithm Answer: d)
Floyd-Warshall algorithm
Database Systems:
Question 51: Which database model is designed for storing unstructured or semi-
structured data like documents, images, and videos? a) Relational model b) NoSQL
model c) Hierarchical model d) Object-oriented model Answer: b) NoSQL model
Question 52: What is the purpose of SQL's "GROUP BY" clause in a query? a) To
filter rows based on a condition b) To sort the result set c) To perform arithmetic
operations d) To group rows with similar values Answer: d) To group rows with
similar values
Question 54: What is the process of transforming a relational database design into
a set of tables with normalized structures called? a) Indexing b) Denormalization c)
Data warehousing d) Normalization Answer: d) Normalization
Question 55: Which type of index organizes the index entries in the same order as
the data rows in the table? a) B-tree index b) Bitmap index c) Clustered index d)
Non-clustered index Answer: c) Clustered index
Operating Systems:
Question 59: In virtual memory management, what is the term for a block of data
that is transferred between main memory and secondary storage? a) Page b) Frame
c) Sector d) Cluster Answer: a) Page
Question 60: Which type of operating system is designed to manage and control
industrial processes and machinery? a) Batch operating system b) Real-time
operating system c) Multi-user operating system d) Distributed operating system
Answer: b) Real-time operating system
Data Structures and Algorithms:
Question 61: What is the main advantage of using a hash table for data storage? a)
Constant-time insertion and retrieval b) Constant-time deletion c) Automatic
sorting of data d) Efficient memory usage Answer: a) Constant-time insertion and
retrieval
Question 62: Which algorithm is used to find the minimum spanning tree of a
connected, undirected graph? a) Depth-First Search (DFS) b) Breadth-First Search
(BFS) c) Dijkstra's algorithm d) Kruskal's algorithm Answer: d) Kruskal's
algorithm
Question 65: In a binary search tree, what is the maximum number of nodes at
level k? a) 2^k b) k c) 2^(k-1) d) 2^(k+1) - 1 Answer: a) 2^k
Database Systems:
Question 68: Which type of database system is designed to handle large volumes
of data with complex relationships and transactions? a) Relational database b)
Object-oriented database c) Distributed database d) In-memory database Answer:
a) Relational database
Question 69: What is the process of transforming unstructured data into a
structured format suitable for analysis and reporting? a) Denormalization b)
Normalization c) Data mining d) ETL (Extract, Transform, Load) Answer: d) ETL
(Extract, Transform, Load)
Question 70: Which type of database model represents data as a collection of key-
value pairs and is suitable for high-speed, low-latency operations? a) Relational
model b) Document model c) Graph model d) Key-Value model Answer: d) Key-
Value model
Operating Systems:
Question 75: Which type of operating system is designed to manage the execution
of real-time applications that have strict timing requirements? a) Batch operating
system b) Multi-user operating system c) Real-time operating system d)
Distributed operating system Answer: c) Real-time operating system
Question 78: What is the time complexity of searching for an element in a hash
table with a good hash function? a) O(1) b) O(log n) c) O(n) d) O(n^2) Answer: a)
O(1)
Question 79: Which algorithm is used to find the longest increasing subsequence
in an array? a) Dijkstra's algorithm b) Kruskal's algorithm c) Longest Common
Subsequence (LCS) algorithm d) Longest Increasing Subsequence (LIS) algorithm
Answer: d) Longest Increasing Subsequence (LIS) algorithm
Question 80: In a graph, what is the number of edges required for a complete
graph with n vertices? a) n b) n - 1 c) n*(n-1)/2 d) n*(n+1)/2 Answer: c) n*(n-1)/2
Database Systems:
Question 81: In a relational database, what is a candidate key? a) A key used for
encryption b) A key used for indexing purposes c) A unique identifier for a table
row d) A potential primary key for a table Answer: d) A potential primary key for
a table
Question 82: Which database model is designed to store and query graph-like
structures? a) Relational model b) Document model c) Graph model d) Key-Value
model Answer: c) Graph model
Question 84: What is the process of organizing data into a series of related tables
to minimize data redundancy and improve data integrity? a) Normalization b)
Denormalization c) Indexing d) Aggregation Answer: a) Normalization
Question 85: Which type of database system is designed for handling complex
queries and high-speed read operations? a) Relational database b) Document
database c) Columnar database d) Key-Value database Answer: c) Columnar
database
Operating Systems:
Question 88: What is the purpose of the "fork" system call in Unix-like operating
systems? a) To execute a new process b) To create a new file c) To allocate
memory for a process d) To delete a process Answer: a) To execute a new process
Question 90: Which type of operating system is designed to manage and control
the execution of tasks and processes in real time? a) Batch operating system b)
Multi-user operating system c) Real-time operating system d) Distributed operating
system Answer: c) Real-time operating system
Question 91: What is the main purpose of a hash function in hash tables? a) To
store data sequentially b) To provide sorting capabilities c) To distribute data
evenly across buckets d) To eliminate duplicates Answer: c) To distribute data
evenly across buckets
Question 94: In graph theory, what is a cycle? a) A path that visits all vertices
once b) A path that visits no vertices more than once c) A closed path that visits
vertices more than once d) A path that includes only odd-numbered vertices
Answer: c) A closed path that visits vertices more than once
Database Systems:
Question 97: Which type of database model is designed to store and query semi-
structured or hierarchical data? a) Relational model b) Document model c) Graph
model d) Key-Value model Answer: b) Document model
Question 99: What is the process of combining data from multiple tables to create
a result set in a relational database? a) Indexing b) Normalization c) Aggregation
d) Querying Answer: d) Querying
Question 100: Which type of database system is optimized for high-speed write
operations and supports append-only storage? a) Relational database b) Columnar
database c) Document database d) Key-Value database Answer: b) Columnar
database
Operating Systems:
Question 101: What is the main purpose of the operating system's kernel? a) To
manage hardware resources b) To manage software applications c) To provide user
interfaces d) To perform arithmetic calculations Answer: a) To manage hardware
resources
Question 105: Which type of operating system allows multiple users to access the
same file or resource simultaneously without conflicts? a) Single-user operating
system b) Multi-user operating system c) Real-time operating system d) Batch
operating system Answer: b) Multi-user operating system