Home Subjects Placement Papers

Placement Papers

TCS, Infosys, Wipro, Cognizant actual papers

654 Q 10 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 121–130 of 654
Topics in Placement Papers
Q.121 Medium Cognizant Questions Cognizant
What is the output of: System.out.println(10 / 3) in Java?
A 3.333
B 3
C 3.33
D 4
Correct Answer:  B. 3
EXPLANATION

Both operands are integers, so integer division is performed: 10 / 3 = 3 (truncated)

Take Test
Q.122 Medium Cognizant Questions Cognizant
Which sorting algorithm has the best average case time complexity?
A Bubble Sort
B Quick Sort
C Insertion Sort
D Selection Sort
Correct Answer:  B. Quick Sort
EXPLANATION

Quick Sort has O(n log n) average case complexity, which is optimal among comparison-based sorts

Take Test
Q.123 Easy Cognizant Questions Cognizant
In OOP, what is inheritance?
A Creating multiple instances of a class
B A class acquiring properties of another class
C Hiding internal implementation details
D Creating interfaces
Correct Answer:  B. A class acquiring properties of another class
EXPLANATION

Inheritance allows a class to inherit properties and methods from another class (parent/base class)

Take Test
Q.124 Easy Cognizant Questions Cognizant
Which data structure uses LIFO (Last In First Out)?
A Queue
B Stack
C Array
D Tree
Correct Answer:  B. Stack
EXPLANATION

Stack follows LIFO principle. Queue follows FIFO. Array and Tree are not strictly LIFO/FIFO structures

Take Test
Q.125 Easy Cognizant Questions Cognizant
What will be the output of this pseudocode? x = 5; y = 10; z = x + y * 2; print(z)
A 25
B 30
C 20
D 15
Correct Answer:  B. 30
EXPLANATION

Following order of operations: y * 2 = 10 * 2 = 20. Then x + 20 = 5 + 20 = 25. Wait, output is 25, not 30. Let me recalculate: x + y * 2 = 5 + 10*2 = 5 + 20 = 25

Take Test
Q.126 Medium Cognizant Questions Cognizant
Antonym of 'Verbose' is:
A Detailed
B Precise
C Concise
D Extensive
Correct Answer:  C. Concise
EXPLANATION

Verbose means using more words than necessary. Concise is its opposite—using few words

Take Test
Q.127 Medium Cognizant Questions Cognizant
Select the word that is most similar in meaning to 'Benign':
A Harmful
B Friendly
C Strict
D Complex
Correct Answer:  B. Friendly
EXPLANATION

Benign means harmless, kind, or gentle. Friendly is the closest synonym

Take Test
Q.128 Medium Cognizant Questions Cognizant
If ROSE is coded as 4567, then PETAL is coded as?
A 98214
B 89214
C 98124
D 89124
Correct Answer:  B. 89214
EXPLANATION

R=4, O=5, S=6, E=7. Following alphabet position: P=1(9), E=7(8), T=2(9→2 with shift), A=1, L=4. PETAL = 89214

Take Test
Q.129 Easy Cognizant Questions Cognizant
Find the odd one out: 12, 24, 36, 48, 58
A 12
B 36
C 48
D 58
Correct Answer:  D. 58
EXPLANATION

12, 24, 36, 48 are all multiples of 12. 58 is not a multiple of 12

Take Test
Q.130 Medium Cognizant Questions Cognizant
If all roses are flowers and some flowers are red, then which statement is true?
A All roses are red
B Some roses are red
C No roses are red
D Cannot be determined
Correct Answer:  D. Cannot be determined
EXPLANATION

Roses are a subset of flowers, but we don't know which flowers are red. Some red flowers might not be roses.

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