Home Subjects Placement Papers

Placement Papers

TCS, Infosys, Wipro, Cognizant actual papers

654 Q 10 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 221–230 of 654
Topics in Placement Papers
Q.221 Medium Capgemini Questions Capgemini
What is the main difference between ArrayList and LinkedList in Java?
A ArrayList is faster for random access
B LinkedList is faster for random access
C Both have same performance
D ArrayList uses more memory
Correct Answer:  A. ArrayList is faster for random access
EXPLANATION

ArrayList provides O(1) random access, while LinkedList provides O(n) access

Take Test
Q.222 Medium Capgemini Questions Capgemini
In Java, which keyword is used to prevent inheritance?
A private
B protected
C final
D static
Correct Answer:  C. final
EXPLANATION

The 'final' keyword prevents a class from being subclassed or inherited

Take Test
Q.223 Easy Capgemini Questions Capgemini
What is the main purpose of a constructor in a class?
A To delete objects
B To initialize objects
C To perform calculations
D To print data
Correct Answer:  B. To initialize objects
EXPLANATION

A constructor is used to initialize objects of a class with default or specified values

Take Test
Q.224 Easy Capgemini Questions Capgemini
Which data structure uses LIFO (Last In First Out) principle?
A Queue
B Stack
C Array
D Linked List
Correct Answer:  B. Stack
EXPLANATION

Stack follows LIFO principle where the last element added is the first to be removed

Take Test
Q.225 Easy Capgemini Questions Capgemini
What will be the output of: print(5 // 2) in Python?
A 2
B 2.5
C 3
D Error
Correct Answer:  A. 2
EXPLANATION

The // operator is floor division. 5 // 2 = 2 (integer division, rounded down)

Take Test
Q.226 Easy Capgemini Questions Capgemini
What is the correct SQL syntax to select all records from a table named 'Students'?
A SELECT * TABLE Students;
B SELECT * FROM Students;
C FETCH * FROM Students;
D GET * FROM Students;
Correct Answer:  B. SELECT * FROM Students;
EXPLANATION

The correct SQL syntax is 'SELECT * FROM table_name;'

Take Test
Q.227 Easy Capgemini Questions Capgemini
In OOPS, what does 'inheritance' allow you to do?
A Create multiple objects
B Derive a new class from an existing class
C Combine two classes
D Delete a class
Correct Answer:  B. Derive a new class from an existing class
EXPLANATION

Inheritance allows a new class to be derived from an existing class, inheriting its properties and methods

Take Test
Q.228 Easy Capgemini Questions Capgemini
Which of these is NOT a programming language?
A Java
B Python
C HTML
D JavaScript
Correct Answer:  C. HTML
EXPLANATION

HTML is a markup language, not a programming language. Others are programming languages

Take Test
Q.229 Easy Capgemini Questions Capgemini
What does the acronym 'API' stand for?
A Application Programming Interface
B Advanced Protocol Integration
C Application Process Identifier
D Automated Programming Implementation
Correct Answer:  A. Application Programming Interface
EXPLANATION

API stands for Application Programming Interface, a set of rules for software interaction

Take Test
Q.230 Medium Capgemini Questions Capgemini
Identify the error in: 'The team were playing good football yesterday.'
A were playing
B good football
C yesterday
D No error
Correct Answer:  B. good football
EXPLANATION

'Good' should be 'well' when describing how something is done (adverb usage)

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