Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
Deloitte is a top global consulting firm that helps companies tackle complex business challenges. To clear the Deloitte interview you will require solid preparation & an understanding of many programming concepts.
In this article, we'll cover some commonly asked Deloitte interview questions across various domains like programming, databases, networking & operating systems.
Beginner Level Deloitte Interview Questions and Answers
1. What is an implicit cursor?
In PL/SQL, an implicit cursor is a cursor automatically created by Oracle whenever a DML statement (INSERT, UPDATE, DELETE) is executed. It allows access to cursor attributes like:
SQL%FOUND - Returns TRUE if statement affected 1+ rows
SQL%NOTFOUND - Returns TRUE if statement affected no rows
SQL%ROWCOUNT - Returns number of rows affected by statement
For Example:
BEGIN
UPDATE employees SET salary = salary * 1.1;
DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' rows updated');
END;
You can also try this code with Online MySQL Compiler
C is a general-purpose, procedural programming language developed in the 1970s. It provides low-level memory manipulation, a simple set of keywords & an efficient approach to programming. C is widely used for system programming, embedded software, kernels & device drivers. It influenced many later languages like C++, Java & Python.
3. What is the difference between char & varchar in DBMS?
Parameters
char
varchar
Storage
Fixed-length, blank-padded
Variable-length
Size
Occupies declared size
Occupies actual data size + 1 byte
Efficiency
Faster for fixed-length data
More space-efficient for variable-length
Max Size
255 bytes
Up to 65,535 bytes
4. Can you explain function overloading?
Function overloading is a feature in OOP where multiple functions can have the same name but different parameters. The correct function to call is determined based on the number, order & type of arguments.
Example in C++:
int sum(int a, int b) {
return a + b;
}
double sum(double a, double b) {
return a + b;
}
int sum(int a, int b, int c) {
return a + b + c;
}
You can also try this code with Online Java Compiler
Backpropagation is an algorithm used to train artificial neural networks. It calculates the gradient of the loss function with respect to each weight by the chain rule, computing partial derivatives one layer at a time, iterating backward from the last layer. This allows weights to be updated in a way that reduces loss.
6. What is polymorphism in programming?
Polymorphism means "many forms". It's an OOP concept where objects can take on multiple forms or behaviors. The two types are:
Compile-time (static) polymorphism: Achieved through function & operator overloading
Run-time (dynamic) polymorphism: Achieved through virtual functions & inheritance
7. What is SMTP?
Simple Mail Transfer Protocol (SMTP) is the standard protocol for sending emails across the internet. It is a part of the application layer of the TCP/IP protocol. SMTP uses port 25 by default & follows a client-server model. The client, an email sender, establishes a TCP connection to an SMTP server & sends the mail across this connection using SMTP commands.
8. What are access specifiers in C++?
Access specifiers define the accessibility of class members. The three specifiers are:
public: Members are accessible from outside the class
private: Members cannot be accessed from outside the class
protected: Members cannot be accessed from outside the class, however, they can be accessed in inherited classes
Example:
class MyClass {
public:
int x;
private:
int y;
protected:
int z;
};
You can also try this code with Online Java Compiler
9. What is the role of IEEE in computer networking?
The Institute of Electrical & Electronics Engineers (IEEE) is a professional association that develops standards for telecommunications, computer engineering & similar disciplines.
Important IEEE standards for networking are:
IEEE 802.3: Ethernet
IEEE 802.11: Wireless LAN (Wi-Fi)
IEEE 802.15.1: Bluetooth
IEEE 802.15.4: Low-Rate Wireless PAN (Zigbee)
IEEE 802.16: Broadband Wireless Access (WiMAX)
10. What is a Kernel in OS?
The kernel is the central component of an operating system that manages system resources & provides services for other parts of the OS. It acts as an intermediary between applications & hardware, handling tasks like memory & process management, file systems, device drivers & system calls. The kernel typically operates in privileged mode with full access to system memory & resources.
Intermediate Level Deloitte Interview Questions and Answers
11. How can you create & use threads in Java?
In Java, you can create threads by either extending the Thread class or implementing the Runnable interface.
Here's an example of creating a thread by extending Thread:
public class MyThread extends Thread {
public void run() {
System.out.println("Thread is running");
}
public static void main(String[] args) {
MyThread t = new MyThread();
t.start();
}
}
You can also try this code with Online Java Compiler
The run() method contains the code executed in the thread. You create an instance of your thread class & call its start() method.
To create a thread using Runnable:
public class MyRunnable implements Runnable {
public void run() {
System.out.println("Thread is running");
}
public static void main(String[] args) {
Thread t = new Thread(new MyRunnable());
t.start();
}
}
You can also try this code with Online Java Compiler
You create a class that implements Runnable, pass an instance to a Thread constructor & call start().
12. What is clustering support?
Clustering support refers to the ability of database management systems to work together as a single system. In an Oracle database cluster, two or more interconnected computers (nodes) appear as one server to end users & applications.
Clustering is useful due to:
High availability - if one node fails, others keep the system running
Scalability - processing power can be increased by adding nodes
Load balancing - work is distributed optimally across nodes
Oracle offers clustering solutions like Oracle Real Application Clusters (RAC).
13. What do you understand about tunneling protocol in Computer Networks?
Tunneling protocols are used to transfer data securely over public networks like the internet. They work by encapsulating a payload protocol inside a carrier protocol. This protects data by encrypting it & "tunneling" it through the public network.
14. What is the difference between stored & trigger procedures?
Parameters
Stored Procedure
Trigger
Invocation
Called explicitly by user/application
Fires automatically based on events
Parameters
Can take input/output parameters
No parameters
Execution
Executes independently
Triggered by INSERT, UPDATE, DELETE
Usage
Data processing, complex DB operations
Data integrity, auditing
Scope
Database-level
Table-level
15. What is a Kernel in OS?
In operating systems, the kernel is the central component that manages system resources & communication between hardware & software. It is the lowest-level abstraction layer in the OS. The kernel's responsibilities are:
Process management - creates, schedules & terminates processes
Device management - manages device communication via drivers
System calls - handles requests for service from processes
The kernel is critical for maintaining the stability & security of the OS.
16. What are the pros & cons of star topology in Computer Networks?
Pros of Star Topology:
Easy to install & configure
Centralized management through the central hub
Easy to add or remove devices
Fault isolation - failure of one node doesn't affect others
Good performance - traffic only travels through relevant links
Cons of Star Topology:
Central hub is a single point of failure
Requires more cable compared to other topologies
Cost of installation & maintenance is higher
Central hub can become a bottleneck under heavy traffic
17. Differentiate between hierarchical models & network models in DBMS.
Parameters
Hierarchical Model
Network Model
Structure
Tree-like with parent-child relationships
Graph-like with multiple parent-child relationships
Relationship
One-to-one or one-to-many
Many-to-many
Access
Navigational, using pointers
Navigational, using pointers
Flexibility
Less flexible, rigid structure
More flexible, complex relationships
Examples
IBM's IMS (Information Management System)
IDMS (Integrated Database Management System)
18. What is the difference between a crossover & a straight-through cable?
Parameters
Crossover Cable
Straight-through Cable
Wiring
Tx & Rx pins crossed
Tx & Rx pins connected straight through
Usage
Connecting devices of the same type (e.g., switch to switch)
Connecting different types of devices (e.g., switch to router)
Pin Connections
1 → 3, 2 → 6, 3 → 1, 6 → 2
1 → 1, 2 → 2, 3 → 3, 6 → 6
Standards
10BASE-T & 100BASE-TX Ethernet
10BASE-T, 100BASE-TX & 1000BASE-T Ethernet
19. Explain transaction atomicity in context to OS.
In operating systems, transaction atomicity ensures that a transaction is treated as a single, indivisible unit of work. It either executes completely or not at all. If any part of the transaction fails, the entire transaction is rolled back, leaving the system in its previous consistent state. This is known as the "all or nothing" property.
Atomicity is a key component of the ACID properties (Atomicity, Consistency, Isolation, Durability) that guarantee reliable transaction processing. It protects data integrity by preventing partial or incomplete transactions.
20. What is the difference between a declaration & a definition for a variable or a function in C?
Parameters
Declaration
Definition
Purpose
Announces the existence of a variable or function
Allocates storage for a variable or provides the actual implementation of a function
Memory Allocation
No memory allocated
Memory is allocated
Initialization
Variable not initialized
Variable can be initialized
Function Body
No function body provided
Function body is defined
Frequency
Can be done multiple times
Done only once
Example (Variable)
extern int x;
int x = 5;
Example (Function)
void foo();
void foo() { // code }
Advanced Level Deloitte Interview Questions and Answers
21. What is generational garbage collection in the context of Java? What makes it so popular?
Generational garbage collection is a memory management strategy used by Java's garbage collector. It's based on the observation that most objects have a short lifespan (die young), while fewer objects survive long-term.
The heap is divided into multiple generations:
Young Generation: New objects are allocated here. It's further divided into Eden space & Survivor spaces (S0 & S1).
Old Generation: Long-surviving objects are promoted here from the Young Generation.
Permanent Generation (Removed in Java 8): Held metadata like class definitions & interned strings.
Benefits which makes Generational GC popular are :
Efficiency - focuses collection efforts on the Young Generation, where most garbage is found
Performance - minor GC runs are quick & frequent, while major GC runs (on the Old Generation) are less common
Minimal pauses - generational collection reduces stop-the-world pause times compared to classic GC algorithms
22. How can you delete rows & columns from a DataFrame?
To delete rows from a DataFrame, you can use:
df.drop(labels, axis=0): Drop rows based on row labels
df.drop(index, axis=0): Drop rows based on row index
df = df[~condition]: Drop rows based on a boolean condition
To delete columns from a DataFrame:
df.drop(columns, axis=1): Drop columns based on column names
del df[column]: Delete a column using the del keyword
23. How is BETWEEN operator different from IN operator in SQL?
Parameters
BETWEEN Operator
IN Operator
Usage
Selects values within a range
Selects values that match any value in a list
Syntax
BETWEEN min AND max
IN (value1, value2, ...)
Datatype
Works with numbers, strings & dates
Works with any datatype
Range
Inclusive of endpoints (min & max values)
Not applicable
Subquery
Cannot be used with subquery
Can be used with subquery
Example
SELECT * FROM employees WHERE age BETWEEN 25 AND 35;
SELECT * FROM employees WHERE department IN ('Sales', 'Marketing');
24. What do you mean by Java Daemon Thread?
In Java, a daemon thread is a low-priority thread that runs in the background & doesn't prevent the JVM from exiting when the program finishes. Daemon threads are used for background supporting tasks like garbage collection, I/O caching, etc.
Key points about daemon threads:
The JVM exits when all user (non-daemon) threads finish execution
Daemon threads are abruptly terminated by the JVM when all user threads have exited
Use setDaemon(true) before starting a thread to make it a daemon thread
Daemon status must be set before starting the thread, else IllegalThreadStateException is thrown
The default priority of daemon threads is 1 (MIN_PRIORITY)
25. What is a composition in Java, & list its uses?
Composition in Java is a design principle where a class contains a reference to another class as a member variable. It represents a "has-a" relationship between objects, where one object contains or is composed of one or more instances of another object.
Uses of Composition:
Code Reuse: Composition allows reusing existing class code by including it as a member variable.
Flexibility: Classes can be composed of multiple smaller classes, each responsible for a specific functionality.
Encapsulation: Composition helps achieve encapsulation by hiding the internal details of composed classes.
Maintainability: Changes to a composed class don't affect the composing class, making the code more maintainable.
26. Why do we use the DISTINCT keyword in SQL?
The DISTINCT keyword in SQL is used to remove duplicate rows from the result set of a SELECT statement. When DISTINCT is specified, unique combinations of values in the selected columns are returned.
Reasons to use DISTINCT:
Eliminate redundant data: DISTINCT ensures that each combination of values appears only once in the output.
Improve query performance: By filtering out duplicates, DISTINCT can reduce the amount of data processed & returned.
Simplify data analysis: DISTINCT provides a cleaner, deduplicated view of the data for easier analysis.
27. Distinguish MySQL & SQL.
Parameters
MySQL
SQL
Type
Relational Database Management System (RDBMS)
Structured Query Language
Purpose
Stores, retrieves & manages data in databases
Standard language for manipulating relational databases
Scope
Specific implementation of SQL
General-purpose query language
Portability
Platform-dependent
Platform-independent
Syntax
Supports additional syntax & features beyond standard SQL
Java doesn't use pointers primarily for security & simplicity reasons:
Security: Pointers can be a significant source of security vulnerabilities. They allow direct access to memory, which can lead to unauthorized access, memory leaks & crashes. By eliminating pointers, Java provides a more secure runtime environment.
Simplicity: Pointers can be complex to understand & use correctly, especially for beginners. Java aims to provide a simpler & more user-friendly programming experience by abstracting memory management through automatic garbage collection.
Robustness: Without pointers, Java eliminates common programming errors like null or dangling pointer dereferences, buffer overflows & memory corruption. This makes Java programs more robust & less prone to low-level memory issues.
Portability: Java's goal is to be platform-independent & truly portable. Pointers are often platform-specific & can hinder portability. By not using pointers, Java bytecode can run on any platform with a Java Virtual Machine (JVM).
Instead of pointers, Java uses references. References provide a more abstract & safe way to access objects without direct memory manipulation.
29. Compare a unique key with a primary key.
Parameters
Unique Key
Primary Key
Nullability
Can contain one NULL value
Cannot contain NULL values
Quantity
Can have multiple unique keys per table
Only one primary key per table
Index
Creates a unique index
Creates a unique clustered index
Constraint
UNIQUE constraint
PRIMARY KEY constraint
Usage
Enforces uniqueness of values in a column or group of columns
Uniquely identifies each record in a table
Composition
Can be composed of multiple columns
Can be a single column or a composite of multiple columns
Ordering
Not used for sorting records
Used as the default sorting order for records
30. What do you mean by view in SQL?
In SQL, a view is a virtual table based on the result set of a SELECT statement. It consists of a set of named columns & rows, just like a real table, but it doesn't store data itself. Instead, a view derives its data from one or more base tables.
Important points about views:
Views are created using the CREATE VIEW statement
Views can be queried like regular tables using SELECT
Views can simplify complex queries by encapsulating the underlying query logic
Views provide an additional layer of security by restricting access to certain columns or rows
Views can be used to present different subsets of data to different users
Updating a view updates the underlying base tables (with some restrictions)
Conclusion
We hope you have gained some insights on Deloitte Interview Questions through this article. We understand that preparing for interviews can be nerve-wracking and hope these Deloitte Interview Questions will help you during your upcoming interviews.
You can also practice coding questions commonly asked in interviews on Coding Ninjas Code360.