NEW
Font size
S
M
L
XL
WorksheetsPre_Place_Batch_2027_SET_D
Total questions: 40
Worksheet time: 40mins
Name
Class
Date
1.
What is the purpose of an Entity-Relationship (ER) diagram?
a)
To document the syntax of SQL
b)
To model physical database storage
c)
To illustrate database relationships
d)
To monitor database performance
2.
Which of the following best describes an attribute in an ER model?
a)
A link between entities
b)
A primary key
c)
A characterstic or property of an entity
d)
A type of relationship
3.
A relationship in an ER model that involves more than two entity types is known as:
a)
A binary relationship
b)
A ternary relationship
c)
A primary relationship
d)
An associative relationship
4.
Which of the following is NOT a type of integrity constraint in a relational database?
a)
Referential integrity
b)
Semantic integrity
c)
Structural integrity
d)
Domain integrity
5.
In SQL, the JOIN clause is used to:
a)
Combine rows from only two tables based on related columns
b)
Delete matching rows in two tables
c)
Update matching columns in two tables
d)
Combine rows from two or more tables based on related columns
6.
What does the term 'cardinality' refer to in the context of databases?
a)
The uniqueness of data in a column
b)
The number of rows in a table
c)
The number of tables in a database
d)
The relationships between tables
7.
What is true about deadlock prevention in databases?
a)
It allows cycles in wait-for graphs
b)
It is better than detection
c)
It ensures no starvation
d)
It ensures at least one transaction aborts
8.
If transaction T1 holds a read lock and T2 requests a write lock on the same data item, what occurs?
a)
T2 proceeds
b)
Both are allowed
c)
T2 waits
d)
Deadlock
e)
T1 is aborted
9.
A user runs a query that performs a full table scan repeatedly. What is the best way to improve performance?
a)
Add redundant columns
b)
Add an index on relevant column
c)
Denormalize the table
d)
Normalize the table
e)
Use a view
10.
A database must store historical prices for products, allowing you to query product price on a specific date. Which data model supports this best?
a)
Hierarchical model
b)
Relational model
c)
Time-series model
d)
Network model
e)
ER model
11.
What is the result of SELECT NULL + 100; in SQL?
a)
100
b)
NULL
c)
Error
d)
1
12.
What is the key idea of Radix Sort?
a)
Divide and Conquer
b)
Bitmasking
c)
Digit-by-digit sorting
d)
Tree traversal
e)
Heapify
13.
Which sorting algorithm is least efficient on large data?
a)
Quick Sort
b)
Merge Sort
c)
Bubble Sort
d)
Heap Sort
e)
Counting Sort
14.
Which algorithm is fastest for small datasets?
a)
Quick Sort
b)
Merge Sort
c)
Insertion sort
d)
Heap Sort
e)
Counting Sort
15.
ou are designing a system to handle high-frequency trading transactions. Which data structure would ensure that you can access the minimum transaction value in O(1) time while maintaining insertion and deletion in O(1)?
a)
Queue
b)
Stack
c)
Min-Heap
d)
Stack with Auxiliary stack
e)
Priority Queue
16.
You're building an autocomplete feature. You need to store a large dictionary and retrieve words based on prefix search. Which data structure would be optimal?
a)
Selection sort
b)
Bubble Sort
c)
Insertion sort
d)
Merge Sort
e)
Linear Sort
17.
n a social media app, you need to suggest mutual friends using common connections. Which algorithm is best suited for this?
a)
Dijkstra
b)
Kruskal
c)
DFS
d)
BFS
e)
Floyd-Warshall
18.
For a recommendation system, you need to identify connected components in a graph of users. What approach is suitable?
a)
Dijkstra
b)
Kruskal
c)
DFS
d)
BFS
e)
Floyd-Warshall
19.
The data structure required to check whether an expression contains balanced parenthesis is?
a)
Stack
b)
Queue
c)
Array
d)
Tree
20.
Which of the following is not a stable sorting algorithm?
a)
Insertion Sort
b)
Selection Sort
c)
Bubble Sort
d)
Merge Sort
21.
Consider an array S of integers :
S = {1, 1, 1, 2, 4, 3, 4, 3, 4, 3, 2, 2, 3, 4, 3}
The following operations are performed on the array:
1. Duplicates are removed.
2. 4 is appended.
3. 1 is appended.
4. 2 is appended.
5. Duplicates are removed.
Calculate the sum of all the elements of the array
a)
6
b)
8
c)
9
d)
10
22.
Instance of which type of class can’t be created?
a)
Parent Class
b)
Abstract class
c)
Anonymous Class
d)
Nested class
23.
Which feature can be implemented using encapsulation?
a)
Polymorphism
b)
Overloading
c)
Inheritance
d)
Abstraction
24.
When does the "diamond problem" occur in programming?
a)
When multiple interfaces are implemented
b)
When a class inherits from two classes with the same method
c)
When multiple classes inherit from a single class
d)
All of the mentioned
25.
Which among the following is not a necessary condition for constructors?
a)
Its name must be same as that of class
b)
It must not have any return type
c)
It must contain a definition body
d)
It can contains arguments
26.
What is encapsulation in OOP?
a)
It is a way of combining various data members and member functions that operate on those data members into a single unit
b)
It is a way of combining various data members and member functions into a single unit which can operate on any data
c)
It is a way of combining various data members into a single unit
d)
It is a way of combining various member functions into a single unit
27.
Which is not true about static methods?
a)
Belong to the class
b)
Cannot access instance variables
c)
Can be overridden
d)
Don't require object
e)
Can be called using class name
28.
In object-oriented programming, late binding means
a)
Variables are declared at runtime
b)
Method is called using virtual table
c)
All methods are static
d)
Object’s data is hidden
e)
Class is abstract
29.
Which of the following is not a design pattern?
a)
Singleton
b)
Factory
c)
Adapter
d)
Override
e)
Proxy
30.
What is regression testing?
a)
Testing new features
b)
Testing after bug fixes
c)
Performance testing
d)
Security testing
31.
Which activity is NOT part of maintenance phase?
a)
Bug fixing
b)
Feature enhancement
c)
Requirement analysis
d)
Performance tuning
32.
In SDLC, what is verification?
a)
Ensuring product meets user needs
b)
Ensuring product is built correctly
c)
Detecting defects
d)
Deploying software
33.
Which phase focuses on feasibility analysis?
a)
Design
b)
Planning
c)
Testing
d)
Deployment
34.
Which SDLC model is best for projects with frequently changing requirements?
a)
Waterfall
b)
Agile
c)
Spiral
d)
V-Model
35.
Which protocol is stateless by design?
a)
FTP
b)
HTTP
c)
SMTP
d)
TCP
36.
What is the primary purpose of a load balancer?
a)
Encrypt data
b)
Store session data
c)
Distribute traffic evenly
d)
Monitor system logs
37.
Which caching strategy removes the least recently used data?
a)
FIFO
b)
LFU
c)
LRU
d)
Random eviction
38.
Predict the Output:
s="abcd"
for i from 0 to length(s)-1:
if i%2==0:
print s[length(s)-1-i]
a)
da
b)
d b
c)
d c
d)
d a
39.
Predict the output:
arr=[2,4,6,8]
i=0 , j=3
count=0
while i<j:
if arr[i]+arr[j] > 8: j--
else: i++
count++
print count
a)
2
b)
3
c)
4
d)
1
40.
Predict the output:
arr=[3,9,2,6]
x = (arr[0] < arr[3]) ? arr[1]/arr[2] : arr[2]/arr[1]
print x
a)
3
b)
4
c)
2
d)
1
Reset
