NEW
Font size
S
M
L
XL
WorksheetsPre_Place_Batch_2027_SET_E
Total questions: 40
Worksheet time: 40mins
Name
Class
Date
1.
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
2.
Which of the following best describes member function overriding?
a)
Member functions having the same name in derived class only
b)
Member functions having the same name and different signature inside main function
c)
Member functions having the same name in base and derived classes
d)
Member functions having the same name in base class only
3.
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
4.
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()
5.
Instance of which type of class can’t be created?
a)
Parent Class
b)
Abstract class
c)
Anonymous Class
d)
Nested class
6.
Which feature can be implemented using encapsulation?
a)
Polymorphism
b)
Overloading
c)
Inheritance
d)
Abstraction
7.
Polymorphism in OOP allows for:
a)
objects to take on multiple forms
b)
methods to execute concurrently
c)
classes to encapsulate data and methods
d)
objects to be instantiated without classes
8.
Which of the following best describes "dynamic polymorphism"?
a)
Compile-time method binding
b)
The ability to create dynamic classes at runtime
c)
Method overriding where method calls are resolved at runtime
d)
The creation of objects at runtime
9.
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
10.
The space required by an algorithm is equal to the sum of the following _______ components.
a)
1
b)
2
c)
3
d)
4
11.
Consider an array A[20, 10], assume 4 words per memory cell and the base address of array A is 100. What is the address of A[11, 5] ? Assume row major storage.
a)
560
b)
565
c)
570
d)
575
12.
Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only.
Given the representation, which of the following operation can be implemented in O(1) time?
i) Insertion at the front of the linked list
ii) Insertion at the end of the linked list
iii) Deletion of the front node of the linked list
iv) Deletion of the last node of the linked list
a)
I and II
b)
I and III
c)
I, II and III
d)
I, II and IV
13.
The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?
a)
Singly linked list
b)
Doubly linked list
c)
Circular doubly linked list
d)
Array implementation of list
14.
In a stack, if a user tries to remove an element from empty stack it is called _________
a)
Underflow
b)
Empty collection
c)
Overflow
d)
Garbage Collection
15.
The data structure required to check whether an expression contains balanced parenthesis is?
a)
Stack
b)
Queue
c)
Array
d)
Tree
16.
Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation.
The maximum number of symbols that will appear on the stack AT ONE TIME during the conversion of this expression?
a)
1
b)
2
c)
3
d)
4
17.
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
18.
Consider a stack of integers.
The stack is allocated 5 memory cells.
STACK : 1, 3, 3, _, _
The following operations are performed on the stack :
i) PUSH(STACK,4)
ii) PUSH(STACK,10)
iii) POP(STACK,ITEM)
What value will be stored in ITEM?
a)
1
b)
10
c)
4
d)
3
19.
A distributed database system is experiencing slow query responses.
What could be a reason for increased latency?
a)
A single overloaded server
b)
Network latency between distributed nodes
c)
Incorrectly configured indexes
d)
All of the above
20.
After partitioning a table across multiple distributed database nodes, some transactions fail due to lost updates. What is a likely cause and solution?
a)
The transactions are accessing non-partitioned data, requiring data replication
b)
Transactions are not being distributed correctly, necessitating a review of the partitioning strategy
c)
Locks are not being acquired on the data, suggesting the need for explicit locking mechanisms
d)
Partitioned data is not being synchronized properly, indicating the need for transaction coordination
21.
How can data inconsistency issues be resolved in a system using eventual consistency?
a)
By immediately synchronizing all data replicas
b)
By using a conflict resolution mechanism such as last write wins
c)
By reducing the number of database replicas
d)
By avoiding updates to data
22.
What distinguishes NoSQL databases from traditional relational databases?
a)
Strict schema enforcement
b)
Support for SQL syntax
c)
Ability to handle unstructured and semi-structured data efficiently
d)
Primarily used for transactional data
23.
Which NoSQL database type is optimized for storing and querying connected data, such as social networks or recommendation systems?
a)
Document store
b)
Key-value store
c)
Graph database
d)
Column-family store
24.
What is "sharding" in the context of NoSQL databases?
a)
The process of replicating data across multiple servers for fault tolerance
b)
Partitioning data across multiple servers to improve performance
c)
Encrypting data at rest
d)
Compressing data to save storage space
25.
Which join is non-equijoin?
a)
ON emp.id = dept.id
b)
ON emp.id > dept.id
c)
ON emp.id = dept.id AND emp.name = dept.name
d)
INNER JOIN with alias
26.
What kind of anomaly is prevented by foreign key constraints?
a)
Insert anomaly
b)
Delete anomaly
c)
Update anomaly
d)
Redundancy
27.
A transaction must ensure other transactions cannot view its intermediate states. Which ACID property is this?
a)
Atomicity
b)
Consistency
c)
Isolation
d)
Durability
28.
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
29.
Which keyword is used to return rows that are in the first query but not in the second?
a)
INTERSECT
b)
UNION
c)
EXCEPT
d)
JOIN
30.
Which design pattern is commonly used for centralized configuration management?
a)
Singleton
b)
Factory
c)
Observer
d)
Adapter
31.
What is eventual consistency?
a)
Data is always consistent
b)
Data becomes consistent over time
c)
Data is never consistent
d)
Data consistency depends on transactions
32.
Sharding primarily improves:
a)
Security
b)
Availability
c)
Scalability
d)
Consistency
33.
Which document defines functional and non-functional requirements?
a)
SRS
b)
Test Plan
c)
Design Document
d)
User Manual
34.
What is a sprint in Agile?
a)
Long-term project plan
b)
Bug fixing phase
c)
Time-boxed iteration
d)
Deployment cycle
35.
Which metric measures code quality?
a)
Velocity
b)
Cyclomatic complexity
c)
Burn-down chart
d)
Lead time
36.
What is the main drawback of synchronous communication?
a)
Loose coupling
b)
High latency
c)
Strong consistency
d)
Better observability
37.
Predict the Output:
arr = [ [2, 1, 4], [6, 3, 5], [7, 8, 9] ]
sum = 0
for i = 0...2:
for j = 0...2:
if arr[i][j] % (i+1) == 0:
sum = sum + arr[i][j]
print sum
a)
15
b)
22
c)
45
d)
18
38.
Predict the Output:
class A:
x = 1
function f():
print x
class B extends A:
x = 2
function f():
print x
A obj = new B()
obj.f()
a)
1
b)
2
c)
depends
d)
error
39.
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
40.
What is the primary purpose of unit testing in software development?
a)
To verify the correctness of individual components
b)
To check the integration of different modules
c)
To validate the performance of the application
d)
To ensure code is free of bugs
Reset
