NEW
Font size
S
M
L
XL
WorksheetsPre_Place_Batch_2027_SET_C
Total questions: 40
Worksheet time: 40mins
Name
Class
Date
1.
Which feature of OOP reduces the use of nested classes?
a)
Inheritance
b)
Binding
c)
Abstraction
d)
Encapsulation
2.
Single level inheritance supports _____________ inheritance.
a)
Language independency
b)
Multiple inheritance
c)
Compile time
d)
Runtime
3.
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
4.
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
5.
Instance of which type of class can’t be created?
a)
Parent Class
b)
Abstract class
c)
Anonymous Class
d)
Nested class
6.
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
7.
In a UML diagram, what does a solid line with a closed arrow represent?
a)
Dependency
b)
Aggregation
c)
Inheritance
d)
Association
e)
Composition
8.
What is the result of calling a private method using base class reference?
a)
Always calls base method
b)
Calls derived method
c)
Calls constructor
d)
Compile-time error
e)
Causes runtime crash
9.
Which relationship is shown by ‘has-a’?
a)
Inheritance
b)
Composition
c)
Abstraction
d)
Polymorphism
e)
Overloading
10.
What is the maximum number of swaps that can be performed in the Selection Sort algorithm?
a)
n - 1
b)
n
c)
1
d)
n-2
11.
Which of the following algorithms are used for string and pattern matching problems?
a)
Z - algorithm
b)
Rabin Karp Algorithm
c)
KMP Algorithm
d)
All of the Above
12.
Consider we have a function, getLCA(), which returns us the Lowest Common Ancestor between 2 nodes of a tree. Using this getLCA() function, how can we calculate the distance between 2 nodes, given that distance from the root, to each node is calculated?
a)
dist(u) + dist(v) - 2 * dist(getLCA(u, v))
b)
dist(u) + dist(v) + 2 * dist(getLCA(u, v))
c)
dist(u) + dist(v)
d)
dist(u) + dist(v) - dist(getLCA(u, v))
13.
Kruskal’s Algorithm for finding the Minimum Spanning Tree of a graph is a kind of a?
a)
DP Problem
b)
Greedy Algorithm
c)
Adhoc Problem
d)
None of the mentioned
14.
The space factor when determining the efficiency of algorithm is measured by
a)
Counting the maximum memory needed by the algorithm
b)
Counting the minimum memory needed by the algorithm
c)
Counting the average memory needed by the algorithm
d)
Counting the maximum disk space needed by the algorithm
15.
An algorithm that calls itself directly or indirectly is known as
a)
Sub algorithm
b)
Recursion
c)
Polish notation
d)
Traversal algorithm
16.
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
17.
If yyy, xxx and zzz are the elements of a lexically ordered binary tree, then in preorder traversal which node will be traverse first
a)
xxx
b)
yyy
c)
zzz
d)
can not be determined
18.
In a balance binary tree the height of two sub trees of every node can not differ by more than
a)
2
b)
1
c)
3
d)
0
19.
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
20.
The Sorting method which is used for external sort is
a)
Bubble Sort
b)
Quick Sort
c)
Merge Sort
d)
Radix Sort
21.
Consider the usual algorithm for determining whether a sequence of parentheses is balanced. What is the maximum number of parentheses that will appear on the stack AT ANY ONE TIME when the algorithm analyzes: (()(())(()))
a)
1
b)
2
c)
3
d)
4
22.
The extra key inserted at the end of the array is called a,
a)
End Key
b)
Stop key
c)
Sentinel
d)
Transposition
23.
The data structure required to check whether an expression contains balanced parenthesis is?
a)
Stack
b)
Queue
c)
Array
d)
Tree
24.
In the context of database security, what does the term 'authentication' refer to?
a)
Ensuring data is not corrupted
b)
Verfiying user identity
c)
Encrypting data
d)
Backing up data
25.
A database query returns unexpected duplicates of some records. What is the most likely reason for this occurrence?
a)
The SELECT statement includes a JOIN without proper conditions
b)
Incorrect use of DISTINCT
c)
The database has been corrupted
d)
A WHERE clause is missing
26.
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
27.
Which SQL clause is used to filter groups of rows that have been aggregated?
a)
WHERE
b)
HAVING
c)
GROUP BY
d)
ORDER BY
28.
Given the following SQL statement:
SELECT Name
FROM Employees
WHERE DepartmentID
IN (
SELECT DepartmentID
FROM Departments
WHERE Budget > 100000);
What does this query do?
a)
Retrieves the names of all employees who work in departments with a budget greater than 100000
b)
Deletes names of employees in departments with high budgets
c)
Updates the names of employees in well-funded departments
d)
Inserts names into Employees for departments with large budgets
29.
A complex query involving multiple JOIN operations is performing poorly.
What is a common method to improve its performance?
a)
Reducing the number of columns in the SELECT clause
b)
Using subqueries instead of JOINs
c)
Optimizing the join order
d)
Increasing the database server's memory
30.
A relation R is in which normal form if every non-prime attribute of R is non-transitively dependent on every key of R?
a)
First Normal Form (1NF)
b)
Second Normal Form (2NF)
c)
Third Normal Form (3NF)
d)
Boyce-Codd Normal Form (BCNF)
31.
In the context of database normalization, what is denormalization used for?
a)
Increasing the complexity of the database
b)
Undoing the normalization process to improve query performance
c)
Secure data storage
d)
Create redundancy for backup purposes
32.
Which component ensures secure communication between services?
a)
Load balancer
b)
API Gateway
c)
Service mesh
d)
Cache
33.
Which storage system offers strong consistency by default?
a)
Cassandra
b)
DynamoDB
c)
HDFS
d)
Traditional RDBMS
34.
Which SDLC phase has the highest cost of defect fixing?
a)
Design
b)
Coding
c)
Testing
d)
Maintenance
35.
Which testing ensures system meets business needs?
a)
Unit
b)
Integration
c)
Acceptance
d)
Smoke
36.
What is regression testing?
a)
Testing new features
b)
Testing after bug fixes
c)
Performance testing
d)
Security testing
37.
Which SDLC model emphasizes risk assessment?
a)
Agile
b)
Spiral
c)
Waterfall
d)
RAD
38.
Predict the Output:
int[] nums = {12, 5, 8, 20, 3};
int val = nums[0];
for (int i = 1; i < nums.length; i++) {
if (nums[i] > val) {
val = nums[i]; } }
a)
Finds the sum of the array.
b)
Finds the minimum value.
c)
Finds the maximum value.
d)
Sorts the array.
39.
Predict the Output:
arr=[1,2,3,4,5]
x = (arr[arr[0]] == arr[3]) ? arr[4] : arr[1]
print x
a)
1
b)
2
c)
4
d)
5
40.
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
Reset
