Comprehensive MCQ
Questions for Deloitte NLA
G
Exam
IN
1. Cyber Security Questions
OD US
Question 1: Which of the following best describes a "Zero-
C O
day vulnerability"?
M
E
A
A. A vulnerability that has been patched
F
B. A vulnerability known to the vendor
is
C. A vulnerability that is currently being exploited and has no patch available
M
K
I
D. A vulnerability that only affects zero users
OC
R
Solution:
1 M
1:
P
C. A vulnerability that is currently being exploited and has no patch available
Explanation: A zero-day vulnerability refers to a security flaw that is unknown to the software vendor and is being
actively exploited by attackers. The term "zero-day" indicates that developers have had zero days to address and
patch the vulnerability.
Question 2: What is the primary purpose of Salting in
password hashing?
A. To make passwords longer
B. To prevent rainbow table attacks
C. To encrypt the password
D. To compress the password
Solution:
B. To prevent rainbow table attacks
Explanation: Salting adds random data to passwords before hashing, ensuring that even identical passwords
produce different hash values. This prevents attackers from using pre-computed rainbow tables to crack
password hashes.
Question 3: In the context of network security, what is a
"Man-in-the-Middle" (MitM) attack?
A. A physical intrusion into a network facility
B. An attack where the perpetrator secretly relays and possibly alters communication between two parties
C. A denial of service attack
D. A malware infection
G
Solution:
IN
B. An attack where the perpetrator secretly relays and possibly alters communication between two parties
Explanation: In a MitM attack, the attacker secretly positions themselves between two communicating parties,
D
intercepting and potentially modifying the communication while making both parties believe they are directly
communicating with each other.
O US key for
Question 4: Which encryption type uses the same
C
encryption and decryption? O
AM
E s F
i
A. Asymmetric encryption
K
M
B. Symmetric encryption
C
I
C. Public key encryption
D. Digital signatures
O
M
R 1:1 Solution:
P
B. Symmetric encryption
Explanation: Symmetric encryption uses the same key for both encryption and decryption processes. This makes
it faster than asymmetric encryption but requires secure key distribution between parties.
Question 5: What is Cross-Site Scripting (XSS)?
A. A type of SQL injection
B. A client-side code injection attack
C. A network protocol
D. An encryption method
Solution:
B. A client-side code injection attack
Explanation: XSS is a security vulnerability that allows attackers to inject malicious client-side scripts into web
pages viewed by other users. These scripts can steal sensitive information or manipulate the website's
appearance and behavior.
Question 6: Which of the following is NOT a common
component of Defense in Depth strategy?
A. Firewalls
B. Social media monitoring
C. Antivirus software
D. Access controls
G
Solution:
IN
B. Social media monitoring
Explanation: While social media monitoring can be part of security awareness, it's not a traditional component of
D
Defense in Depth, which focuses on multiple layers of security controls to protect assets through firewalls,
antivirus, access controls, and other security measures.
O
Question 7: What is the purpose of a SecurityU S
Information
C
O
and Event Management (SIEM) system?
AM
E s F
i
A. To block network attacks
K
M
B. To collect and analyze security events from multiple sources
C
I
C. To encrypt network traffic
D. To manage user passwords
O
M
R 1:1 Solution:
P
B. To collect and analyze security events from multiple sources
Explanation: SIEM systems aggregate and analyze security data from various sources across an organization's
infrastructure, providing real-time analysis of security alerts and helping detect security incidents.
Question 8: What is the main purpose of Network
Segmentation?
A. To increase network speed
B. To reduce the attack surface and contain breaches
C. To save bandwidth
D. To simplify network management
Solution:
B. To reduce the attack surface and contain breaches
Explanation: Network segmentation divides a network into smaller segments, limiting the spread of security
incidents and reducing the attack surface. If one segment is compromised, others remain protected.
Question 9: Which type of malware typically demands
payment to restore access to files or systems?
A. Spyware
B. Ransomware
C. Adware
D. Worms
G
Solution:
IN
B. Ransomware
Explanation: Ransomware is a type of malicious software that encrypts a victim's files or locks their system,
D
demanding payment (usually in cryptocurrency) to restore access to the affected files or systems.
O US
Question 10: What is the purpose of a DMZ (Demilitarized
C
Zone) in network security?
O
AM
E
F
A. To store sensitive data
is
B. To host public-facing services while protecting internal networks
K
M
C. To block all external access
C
I
D. To speed up network traffic
O
M
R
Solution:
1:1
P
B. To host public-facing services while protecting internal networks
Explanation: A DMZ is a network segment that contains public-facing services while keeping them separated from
the internal network. This provides an additional security layer by preventing direct access to internal resources.
5. Object-Oriented Programming (OOPS)
Questions
1. What is the main purpose of Encapsulation in OOP?
a. To inherit properties from parent class. b. To
hide internal details and provide an interface c. To
allow objects to take multiple forms d. To create
multiple instances of a class
Answer: b) To hide internal details and provide an interface Explanation: Encapsulation bundles data and
methods that operate on that data within a single unit, hiding internal details and protecting data integrity through
access control.
2. Which OOP concept allows a class to have multiple methods with the same name?
a. Inheritance b.
Polymorphism c.
Encapsulation d.
Abstraction
Answer: b) Polymorphism Explanation: Method overloading is a form of compile-time polymorphism that allows
multiple methods with the same name but different parameters within a class, providing flexibility in method
usage.
G
3. What is the difference between an abstract class and an interface?
IN
a. Abstract classes can have method implementations, interfaces cannot
b. Interfaces can have constructors, abstract classes cannot
D
c. Abstract classes support multiple inheritance, interfaces do not
d. Interfaces can have fields, abstract classes cannot
O US
Answer: a) Abstract classes can have method implementations, interfaces cannot Explanation: Abstract
C
O
classes can have both abstract and concrete methods, while traditional interfaces (before Java 8) can only have
M
method declarations. Abstract classes provide a way to share code among related classes.
A
E
F
is
4. What is the purpose of a constructor in OOP?
K
M
C
a. To destroy objects
I
O
b. To initialize object attributes
M
R
c. To inherit from a parent class
d. To implement interfaces
1:1
P
Answer: b) To initialize object attributes Explanation: Constructors are special methods called when creating
an object, used to initialize the object's attributes and ensure it starts in a valid state.
5. What is method overriding?
a. Creating multiple methods with the same name in the same class
b. Creating a method in child class with same signature as parent class
c. Creating private methods
d. Creating static methods
Answer: b) Creating a method in child class with same signature as parent class Explanation: Method
overriding is a runtime polymorphism where a child class provides a specific implementation for a method already
defined in its parent class, allowing specialized behavior.
6. Which type of inheritance allows a class to inherit from multiple classes?
a. Single inheritance
b. Multiple inheritance
c. Multilevel inheritance
d. Hybrid inheritance
Answer: b) Multiple inheritance Explanation: Multiple inheritance allows a class to inherit from more than
one class. However, not all programming languages support this (e.g., Java does not support multiple
inheritance of classes but allows multiple interface implementation).
7. What is the purpose of the 'super' keyword?
a. To access private members
b. To access parent class members
G
c. To create new objects
d. To implement interfaces
IN
Answer: b) To access parent class members Explanation: The 'super' keyword is used to refer to the parent
class's members (methods and attributes), particularly useful in method overriding when you need to call the
D
parent class's version of a method.
O
S
8. What is composition in OOP?
U
C
O
a. A type of inheritance
M
b. A "has-a" relationship between classes
A
E
F
c. A type of polymorphism
is
d. A way to implement interfaces
K
M
C
Answer: b) A "has-a" relationship between classes Explanation: Composition establishes a relationship where
I
O
one class contains an object of another class as a member, representing a "has-a" relationship rather than
M
R
inheritance's "is-a" relationship.
1:1
P
9. What is the purpose of a static method?
a. It can only access static members b. It
can be called without creating an object c. It
cannot be inherited d. It must be overridden
Answer: b) It can be called without creating an object Explanation: Static methods belong to the class rather
than instances of the class, allowing them to be called without creating an object. They can only directly access
other static members.
10. What is the advantage of using interfaces?
a. Code reusability through multiple inheritance
b. Performance improvement
c. Data hiding
d. Memory management
Answer: a) Code reusability through multiple inheritance Explanation: Interfaces allow classes to implement
multiple contracts, effectively achieving a form of multiple inheritance and promoting code reuse while maintaining
loose coupling.
6. SQL Questions
1. Consider the following query:
SELECT department_id, COUNT(*)
FROM employees
G
GROUP BY department_id
HAVING COUNT(*) > 5;
IN
What does this query do?
D
a. Lists all departments
b. Lists departments with more than 5 employees
O
S
c. Lists 5 departments
U
d. Lists employee count for each department
C
O
M
Answer: b) Lists departments with more than 5 employees Explanation: The HAVING clause filters grouped results,
A
E
F
in this case showing only departments where the employee count exceeds 5. GROUP BY aggregates the count by
is
department.
K
M
C
2. What will be the output of:
I
O
M
R
1
SELECT COALESCE(NULL, NULL, 'Hello', NULL, 'World');
1:
P
a. NULL
b. Hello
c. World
d. Error
Answer: b) Hello Explanation: COALESCE returns the first non-null value in its argument list. In this case, 'Hello' is the
first non-null value encountered from left to right.
3. Given tables: Orders(order_id, customer_id, order_date) and Customers(customer_id, name), what type of join
returns all customers, even those without orders?
a. INNER JOIN
b. LEFT JOIN
c. RIGHT JOIN
d. CROSS JOIN
Answer: b) LEFT JOIN Explanation: LEFT JOIN returns all records from the left table (Customers) and matching
records from the right table (Orders). Customers without orders will have NULL values for order fields.
4. What will this query return?
SELECT name,
CASE
WHEN age < 18 THEN 'Minor'
WHEN age BETWEEN 18 AND 65 THEN 'Adult'
ELSE 'Senior'
END as age_category
G
FROM persons;
N
a. Only person names
I
b. Name and age
c. Name and age category (Minor, Adult, or Senior)
D
d. Error
O
Answer: c) Name and age category (Minor, Adult, or Senior) Explanation: The CASE statement creates a conditional
S
output, categorizing each person's age into one of three categories: Minor, Adult, or Senior, returned alongside their
U
C
O
name.
AM
E
5. What is the purpose of the HAVING clause?
F
is
a. To filter rows before grouping
K
M
b. To filter groups after aggregation
C
I
O
c. To sort results
M
d. To join tables
R 1:1
Answer: b) To filter groups after aggregation Explanation: HAVING filters groups after GROUP BY
P
aggregation, while WHERE filters individual rows before grouping. HAVING is used with aggregate functions like
COUNT, SUM, AVG, etc.
6. Given the query:
SELECT * FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);
What does this subquery do?
a. Lists all employees
b. Lists employees with above-average salary
c. Calculates average salary
d. Lists highest paid employee
Answer: b) Lists employees with above-average salary Explanation: The subquery calculates the average salary, and
the main query returns all employees whose salary is greater than this average.
7. What's the difference between DELETE and TRUNCATE?
a. DELETE removes specific rows, TRUNCATE removes all rows
b. DELETE is faster than TRUNCATE
c. TRUNCATE can use WHERE clause
d. They are identical
Answer: a) DELETE removes specific rows, TRUNCATE removes all rows Explanation: DELETE can remove
specific rows using WHERE clause and maintains transaction logs, while TRUNCATE removes all rows quickly by
deallocating pages and doesn't maintain transaction logs.
G
8. What will this query return?
IN
SELECT COUNT(DISTINCT department_id)
FROM employees;
D
a. Total number of employees
O
S
b. Number of unique departments
U
c. Number of departments with employees
C
O
d. Number of employees per department
AM
E
F
Answer: c) Number of departments with employees Explanation: The query counts the number of unique
is
department_id values in the employees table, effectively counting how many different departments have at least one
K
employee.
M
C
I
O
9. What is the purpose of an INDEX in SQL?
M
R
a. To store data
1:1
P
b. To speed up data retrieval
c. To validate data
d. To encrypt data
Answer: b) To speed up data retrieval Explanation: An INDEX is a database structure that improves the speed
of data retrieval operations by providing quick access to rows in a database table, similar to a book's index.
10. What will this query produce?
SELECT department_id,
SUM(salary) OVER (PARTITION BY department_id) as dept_total
FROM employees;
a. Total salary for each department
b. Running total of salaries
c. Department-wise salary total for each employee
d. Average salary by department
Answer: c) Department-wise salary total for each employee Explanation: This window function calculates the total
salary for each department and shows it alongside each employee row, rather than grouping the results like a GROUP
BY would.
7. DBMS Questions
1. What is the purpose of normalization in DBMS?
a. To increase data redundancy
b. To eliminate data redundancy and maintain consistency
c. To speed up queries
G
d. To reduce storage space only
N
Answer: b) To eliminate data redundancy and maintain consistency Explanation: Normalization is a
I
database design technique that reduces data redundancy and helps ensure data consistency by organizing tables
and columns in a systematic way.
D
2. Which normal form deals with transitive dependencies?
O
a. 1NF
US
C
O
b. 2NF
M
c. 3NF
A
E
F
d. BCNF
is
Answer: c) 3NF Explanation: Third Normal Form (3NF) eliminates transitive dependencies, where a non-prime
K
M
C
attribute depends on another non-prime attribute rather than directly on the primary key.
I
O
M
3. What is a deadlock in DBMS?
R 1:1
P
a. When system crashes
b. When two transactions wait for each other to release resources
c. When database is full
d. When queries are too complex
Answer: b) When two transactions wait for each other to release resources Explanation: A deadlock occurs
when two or more transactions are waiting for each other to release locks on resources, creating a circular
dependency that prevents any transaction from proceeding.
4. What is the purpose of ACID properties?
a. To secure the database
b. To ensure database transaction reliability
c. To improve query performance
d. To reduce storage space
Answer: b) To ensure database transaction reliability Explanation: ACID (Atomicity, Consistency, Isolation,
Durability) properties ensure reliable processing of database transactions, maintaining data integrity even in case
of errors.
5. What is the difference between a primary key and a unique key?
a. Primary key can be null, unique key cannot
b. Primary key cannot be null, unique key can be null
c. They are identical
d. Primary key must be numeric
Answer: b) Primary key cannot be null, unique key can be null Explanation: While both ensure uniqueness of
values in a column, a primary key cannot contain NULL values and must be unique, whereas a unique key can
contain one NULL value.
G
6. What is a foreign key?
IN
a. A key used for encryption
b. A key that references primary key of another table
D
c. A backup key
d. A unique identifier
O US
Answer: b) A key that references primary key of another table Explanation: A foreign key is a column or
C
O
combination of columns that creates a link between data in two tables, establishing referential integrity by
M
referencing the primary key of another table.
A
E
F
is
7. What is the purpose of an SQL trigger?
K
M
C
a. To create tables
I
O
b. To automatically execute code in response to database events
M
R
c. To optimize queries
d. To backup data
1:1
P
Answer: b) To automatically execute code in response to database events Explanation: Triggers are special
procedures that automatically execute when specific database events (like INSERT, UPDATE, or DELETE) occur,
allowing automatic handling of related actions.
8. What is the difference between INNER JOIN and OUTER JOIN?
a. No difference
b. INNER JOIN returns only matching rows, OUTER JOIN can return non-matching rows
c. INNER JOIN is faster
d. OUTER JOIN is simpler
Answer: b) INNER JOIN returns only matching rows, OUTER JOIN can return non-matching rows
Explanation: INNER JOIN returns only rows that have matching values in both tables, while OUTER JOIN (LEFT,
RIGHT, or FULL) can return non-matching rows from one or both tables.
9. What is a view in DBMS?
a. A physical table
b. A virtual table based on result set of an SQL statement
c. A temporary table
d. A backup copy
Answer: b) A virtual table based on result set of an SQL statement Explanation: A view is a virtual table
G
based on the result set of an SQL statement. It contains rows and columns, just like a real table, but stores the
N
definition rather than the data.
DI
10. What is the purpose of an index scan vs table scan?
O
S
OU
C
a. They are the same thing
AM
E
b. Index scan uses index to find data, table scan reads allFrows
is
K
M OC
c. Table scan is always faster
I M
d. Index scan is always slower
PR
1:1
Answer: b) Index scan uses index to find data, table scan reads all rows Explanation: An index scan uses an
index to quickly locate specific rows, while a table scan reads all rows in a table sequentially. Index scans are
typically faster for selective queries.
MASSIVE SUCCESS RATE
"Transform Your Interview Opportunity into an Offer Letter and Make Your Parents
Proud!"
In-depth Technical Mock
Crack coding challenges with real experts.
HR & Managerial Prep
Master behavioral questions and impress Deloitte
Intervewier.
Full Interview Simulation
Ace both technical and HR in one session.
Resume Review
Identify and fix weaknesses for a standout CV.
Personalized Feedback & Expert Guidance
Tailored improvement tips to boost success.
www.primecoding.in
WWW.PRIMECODING.IN