Deloitte — Interview Questions
Aptitude · Reasoning · English · CS — Corporate & Campus Interview Prep
Showing 431–440 of 654 questions
Q.431
Easy
Deloitte
Which data structure uses LIFO (Last In First Out) principle?
Correct Answer:
B. Stack
Explanation:
Stack follows LIFO principle where the last element added is the first to be removed
Q.432
Easy
Deloitte
What is the main purpose of a constructor in a class?
Correct Answer:
B. To initialize objects
Explanation:
A constructor is used to initialize objects of a class with default or specified values
Q.433
Medium
Deloitte
In Java, which keyword is used to prevent inheritance?
Correct Answer:
C. final
Explanation:
The 'final' keyword prevents a class from being subclassed or inherited
Q.434
Medium
Deloitte
What is the main difference between ArrayList and LinkedList in Java?
Correct Answer:
A. ArrayList is faster for random access
Explanation:
ArrayList provides O(1) random access, while LinkedList provides O(n) access
Q.435
Easy
Deloitte
What does 'HTTP' stand for?
Correct Answer:
A. HyperText Transfer Protocol
Explanation:
HTTP stands for HyperText Transfer Protocol, the foundation of data communication on the web
Q.436
Easy
Deloitte
Which of these is a NoSQL database?
Correct Answer:
C. MongoDB
Explanation:
MongoDB is a NoSQL database. MySQL, PostgreSQL, and Oracle are relational SQL databases
Q.437
Medium
Deloitte
In CSS, what does the 'z-index' property control?
Correct Answer:
C. Stacking order of elements
Explanation:
z-index controls the stacking order of overlapping elements on a webpage
Q.438
Easy
Deloitte
What will be the output of: console.log(typeof 5) in JavaScript?
Correct Answer:
B. number
Explanation:
The typeof operator returns 'number' for numeric values in JavaScript
Q.439
Easy
Deloitte
A rope of length 30 meters is cut into 5 equal parts. How long is each piece?
Correct Answer:
B. 6 meters
Explanation:
30 meters / 5 = 6 meters per piece
Q.440
Medium
Deloitte
If 30% of a number is 45, what is the number?
Correct Answer:
C. 150
Explanation:
Let number = x. 30% of x = 45. 0.30x = 45. x = 45/0.30 = 150