Home Subjects Placement Papers

Placement Papers

TCS, Infosys, Wipro, Cognizant actual papers

312 Q 10 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 141–150 of 312
Topics in Placement Papers
Q.141 Medium HCL Questions HCL
What is the missing number in the series: 2, 6, 12, 20, ?, 42
A 28
B 30
C 32
D 35
Correct Answer:  B. 30
EXPLANATION

Series follows n(n+1): 1×2=2, 2×3=6, 3×4=12, 4×5=20, 5×6=30, 6×7=42

Take Test
Q.142 Medium Accenture Questions Accenture
What is the purpose of Unit Testing?
A To test entire applications
B To test individual components or functions
C To design user interfaces
D To manage databases
Correct Answer:  B. To test individual components or functions
EXPLANATION

Unit testing involves testing individual units or components of code in isolation to ensure they work correctly.

Take Test
Q.143 Medium Accenture Questions Accenture
What is Machine Learning?
A Programming machines to perform tasks
B Teaching machines to learn from data and make predictions
C Manufacturing computers
D Operating heavy machinery
Correct Answer:  B. Teaching machines to learn from data and make predictions
EXPLANATION

Machine Learning is a subset of AI that enables systems to learn from data and improve performance without explicit programming.

Take Test
Q.144 Medium Accenture Questions Accenture
What is an 'Interface' in OOP?
A A graphical display
B A contract that specifies methods a class must implement
C A type of variable
D A database connection
Correct Answer:  B. A contract that specifies methods a class must implement
EXPLANATION

An interface is an abstract type that defines a set of methods that implementing classes must provide.

Take Test
Q.145 Medium Accenture Questions Accenture
What is the difference between '==' and '===' in JavaScript?
A No difference
B '==' checks value, '===' checks value and type
C '==' checks type, '===' checks value
D '===' is only for strings
Correct Answer:  B. '==' checks value, '===' checks value and type
EXPLANATION

'==' is loose equality (compares value only), while '===' is strict equality (compares both value and type).

Take Test
Q.146 Medium Accenture Questions Accenture
What is a 'Constructor' in programming?
A A method that destroys objects
B A special method that initializes objects
C A variable declaration
D A loop structure
Correct Answer:  B. A special method that initializes objects
EXPLANATION

A constructor is a special method called when an object is created to initialize its properties.

Take Test
Q.147 Medium Accenture Questions Accenture
What is the main principle of OOP (Object-Oriented Programming)?
A Writing code in linear fashion
B Organizing code into reusable objects with properties and methods
C Using only functions
D Avoiding data structures
Correct Answer:  B. Organizing code into reusable objects with properties and methods
EXPLANATION

OOP is based on organizing code into objects that contain both data (properties) and functions (methods).

Take Test
Q.148 Medium Accenture Questions Accenture
What is the difference between Stack and Queue?
A Both are the same
B Stack uses LIFO, Queue uses FIFO
C Stack uses FIFO, Queue uses LIFO
D No structural difference
Correct Answer:  B. Stack uses LIFO, Queue uses FIFO
EXPLANATION

Stack (Last In First Out) removes the most recently added element. Queue (First In First Out) removes elements in the order they were added.

Take Test
Q.149 Medium Accenture Questions Accenture
Which sorting algorithm has the worst-case time complexity of O(n^2)?
A Merge Sort
B Quick Sort
C Bubble Sort
D Heap Sort
Correct Answer:  C. Bubble Sort
EXPLANATION

Bubble sort has a worst-case time complexity of O(n^2) when the array is in reverse order.

Take Test
Q.150 Medium Accenture Questions Accenture
What is the time complexity of binary search?
A O(n)
B O(n^2)
C O(log n)
D O(1)
Correct Answer:  C. O(log n)
EXPLANATION

Binary search has a time complexity of O(log n) because it divides the search space in half with each iteration.

Take Test
IGET
iget AI
Online · Ask anything about exams
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips