NEW
Font size
S
M
L
XL
WorksheetsPre_Place_Batch_2027_Set_B
Total questions: 40
Worksheet time: 40mins
Name
Class
Date
1.
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
2.
An attribute that uniquely identifies each entity in an entity set is called a
a)
Composite attribute
b)
Derieved attribute
c)
Multi-valued attribute
d)
Key attribute
3.
To add a column named "Email" of type VARCHAR to an existing table named "Users", which SQL statement is correct?
a)
ALTER TABLE Users ADD COLUMN Email VARCHAR
b)
ALTER TABLE Users ADD Email VARCHAR
c)
UPDATE TABLE Users ADD Email VARCHAR
d)
INSERT INTO Users (Email) VALUES ('VARCHAR')
4.
What is the correct SQL syntax to return only distinct (different) values from the "Name" column in the "Employees" table?
a)
SELECT DISTINCT Name FROM Employees
b)
SELECT UNIQUE Name FROM Employees
c)
SELECT DIFFERENT Name FROM Employees
d)
SELECT Name FROM Employees DISTINCT
5.
The process of minimizing redundancy and dependency by organizing fields and table relationships is known as:
a)
Denormalization
b)
Normalization
c)
Indexing
d)
Partitioning
6.
In SQL, how can you modify an existing table to add a foreign key constraint referencing another table?
a)
ALTER TABLE table_name ADD CONSTRAINT fk_name FOREIGN KEY (column1) REFERENCES other_table(column2)
b)
ALTER TABLE table_name MODIFY COLUMN column_name FOREIGN KEY REFERENCES other_table(column_name)
c)
ALTER TABLE table_name ADD FOREIGN KEY (column_name) REFERENCES other_table
d)
USE table_name ADD FOREIGN KEY REFERENCES other_table
7.
What is the correct way to change the data type of a column in an existing table in SQL?
a)
MODIFY TABLE table_name CHANGE column_name column_name NEW_DATA_TYPE
b)
ALTER TABLE table_name ALTER COLUMN column_name SET DATA TYPE NEW_DATA_TYPE
c)
ALTER TABLE table_name MODIFY COLUMN column_name NEW_DATA_TYPE
d)
ALTER TABLE table_name CHANGE column_name column_name NEW_DATA_TYPE
8.
Which property of a transaction ensures that all operations within the transaction are completed successfully, or none of them are?
a)
Atomicity
b)
Consistency
c)
Isolation
d)
Durability
9.
In the context of transactions, what does the consistency property ensure?
a)
The database remains in a consistent state before and after the transaction
b)
The transaction only shows committed data to external users
c)
Transactions are isolated from each other
d)
The results of the transaction are permanently stored in the database
10.
Which of the following is a Divide and Conquer algorithm?
a)
Bubble Sort
b)
Selection Sort
c)
Heap Sort
d)
Merge Sort
11.
What is the maximum number of children a node can have in an n-ary tree?
a)
2
b)
0
c)
1
d)
n
12.
Which of the following algorithms are used to find the shortest path from a source node to all other nodes in a weighted graph?
a)
BFS
b)
Dijkstra's Algorithm
c)
Prims Algorith
d)
Kruskal's Algorithm
13.
The time factor when determining the efficiency of algorithm is measured by
a)
Counting microseconds
b)
Counting the number of key operations
c)
Counting the number of statements
d)
Counting the kilobytes of algorithm
14.
In a Heap tree
a)
Values in a node is greater than every value in left sub tree and smaller than right sub tree
b)
Values in a node is greater than every value in children of it
c)
Both of above conditions applies
d)
None of above conditions applies
15.
The result of evaluating prefix expression */b+-dacd, where a = 3, b = 6, c = 1, d = 5 is
a)
0
b)
5
c)
10
d)
15
16.
What do you call the selected keys in the quick sort method?
a)
Outer key
b)
Inner Key
c)
Partition Key
d)
Pivot Key
17.
Which method of traversal does not use stack to hold nodes that are waiting to be processed?
a)
Depth First
b)
D-search
c)
Breadth First
d)
Back-tracking
18.
Consider an array A = { 2, 4, 61, 17, 8, 10, 13, 34, 67, 98 } and key element equals 88. How many comparison will it take to find the key element in the array using linear search algorithmn ?
a)
11
b)
8
c)
9
d)
10
19.
In an empty BST, insert the following elements in a similar sequence. Which element will be at the lowest level?
105, 95, 122, 99, 97, 120
a)
95
b)
97
c)
99
d)
120
20.
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
21.
The feature by which one object can interact with another object is _____________
a)
Message reading
b)
Message Passing
c)
Data transfer
d)
Data binding
22.
What happens when an object is passed by reference?
a)
Destructor is called at end of function
b)
Destructor is called when called explicitly
c)
Destructor is not called
d)
Destructor is called when function is out of scope
23.
What happens if non static members are used in static member function?
a)
Executes fine
b)
Compile time error
c)
Executes if that member function is not used
d)
Runtime error
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 feature can be implemented using encapsulation?
a)
Polymorphism
b)
Overloading
c)
Inheritance
d)
Abstraction
26.
If in multiple inheritance, class C inherits class B, and Class B inherits class A. In which sequence are their destructors called if an object of class C was declared?
a)
~A() then ~B() then ~C()
b)
~C() then ~A() then ~B()
c)
~C() then ~B() then ~A()
d)
~B() then ~C() then ~A()
27.
In a payment system, you use a base interface PaymentMethod and classes like CreditCard, UPI, NetBanking. Which OOP feature allows this?
a)
Abstraction
b)
Polymorphism
c)
Encapsulation
d)
Inheritance
e)
Delegation
28.
A class BankAccount exposes methods to deposit() and withdraw() but does not allow direct access to its balance attribute. This demonstrates:
a)
Inheritance
b)
Abstraction
c)
Encapsulation
d)
Overloading
e)
Composition
29.
What is meant by an abstract class?
a)
Cannot be instantiated
b)
Cannot have methods
c)
Can only be used once
d)
Only has static members
e)
Cannot be inherited
30.
In system design, what is idempotency?
a)
Ability to roll back transactions
b)
Same operation produces same result when executed multiple times
c)
System fault tolerance
d)
Data redundancy
31.
A project has unclear requirements and high technical risk. Which SDLC model is most appropriate?
a)
Waterfall
b)
Agile
c)
Spiral
d)
V-Model
32.
Your video streaming platform wants to minimize latency for global users. Which solution provides the highest impact?
a)
Vertical scaling
b)
Database indexing
c)
Content Delivery Network (CDN)
d)
Strong consistency
33.
Which phase includes patch releases?
a)
Testing
b)
Design
c)
Deployment
d)
Maintenance
34.
Which SDLC model is least structured?
a)
Waterfall
b)
Spiral
c)
Agile
d)
Big Bang
35.
What is smoke testing?
a)
Full regression testing
b)
Performance testing
c)
Basic build validation
d)
Security testing
36.
Predict the Output:
List: 1 → 2 → 3 → null
p = head
q = p.next
p.next = q.next
q.next = head
head = q
print list
a)
2→1→3
b)
2→3→1
c)
1→3→2
d)
3→2→1
37.
Predict the Output:
s="aaa"
for i=0...2:
s = s + s[i]
print s
a)
aaaaaaa
b)
aaaaaa
c)
aa
d)
aaaaa
38.
Predict the Output:
int[] data = {10, 20, 30, 40};
int i = 1;
data[i++] = data[++i] + 5;
print(data[1] + " " + i);
a)
45 3
b)
20 3
c)
45 2
d)
35 3
39.
What is the primary purpose of a foreign key in a relational database?
a)
To enforce data integrity within a table
b)
To create an index for faster queries
c)
To establish a relationship between two tables
d)
To uniquely identify a record in a table
40.
In object-oriented programming, what does encapsulation refer to?
a)
Creating multiple instances of a class
b)
Overriding methods in a subclass
c)
Inheriting properties from a parent class
d)
Hiding the internal state of an object
Reset
