Home Subjects Placement Papers

Placement Papers

TCS, Infosys, Wipro, Cognizant actual papers

654 Q 10 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 571–580 of 654
Topics in Placement Papers
Q.571 Easy TCS Questions
TCS placement papers often include questions on SQL. What does the INNER JOIN operation do?
A Returns all rows from both tables regardless of match
B Returns only matching rows from both tables based on join condition
C Returns all rows from left table and matching rows from right table
D Returns only rows from the first table
Correct Answer:  B. Returns only matching rows from both tables based on join condition
EXPLANATION

INNER JOIN returns only rows where there is a match in both tables based on the specified join condition, excluding non-matching rows.

Take Test
Q.572 Medium TCS Questions
In a binary tree with 7 nodes, what is the maximum possible height?
A 2
B 3
C 6
D 7
Correct Answer:  C. 6
EXPLANATION

Maximum height occurs in a skewed (linear) tree where height = n - 1 = 7 - 1 = 6. Minimum height would be 2 for a balanced tree.

Take Test
Q.573 Medium TCS Questions
TCS follows Agile methodology for most projects. Which practice is NOT a part of core Agile principles?
A Daily stand-up meetings
B Fixed scope with no changes once project starts
C Iterative development with regular feedback
D Continuous integration and delivery
Correct Answer:  B. Fixed scope with no changes once project starts
EXPLANATION

Agile embraces changing requirements even late in development. Fixed scope with no flexibility contradicts Agile's core principle of adaptability.

Take Test
Q.574 Medium TCS Questions
A circular queue has size 10. If front=3 and rear=8, how many elements are currently in the queue?
A 5
B 6
C 7
D 8
Correct Answer:  B. 6
EXPLANATION

In a circular queue, number of elements = (rear - front + 1) = (8 - 3 + 1) = 6 elements.

Take Test
Q.575 Medium TCS Questions
In a TCS project using Git version control, a developer needs to undo committed changes. Which command should be used?
A git reset --hard HEAD~1
B git delete commit
C git remove --force
D git undo --all
Correct Answer:  A. git reset --hard HEAD~1
EXPLANATION

git reset --hard HEAD~1 is the standard command to undo the last commit and discard changes. HEAD~1 refers to the previous commit.

Take Test
Q.576 Medium TCS Questions
An array [7, 3, 9, 1, 4, 2, 8] needs to be sorted. If memory is extremely limited, which sorting algorithm should be preferred?
A Merge Sort (requires O(n) extra space)
B Quick Sort (requires O(log n) extra space on average)
C Heap Sort (requires O(1) extra space)
D Bubble Sort with any space complexity
Correct Answer:  C. Heap Sort (requires O(1) extra space)
EXPLANATION

Heap Sort is an in-place sorting algorithm requiring only O(1) extra space, making it optimal for memory-constrained environments despite having O(n log n) time complexity.

Take Test
Q.577 Medium TCS Questions
TCS developers working on cloud-based projects often use microservices architecture. What is a PRIMARY advantage of this approach?
A Single point of failure for entire application
B Independent scalability, easier maintenance, and resilience
C Reduced development time by 50%
D Eliminates need for testing
Correct Answer:  B. Independent scalability, easier maintenance, and resilience
EXPLANATION

Microservices architecture allows individual components to scale independently, improves fault isolation, enables easier updates, and promotes team autonomy in development.

Take Test
Q.578 Easy TCS Questions
In the TCS coding assessment, candidates encounter problems requiring recursion. What is the critical factor that prevents infinite recursion?
A Using global variables
B Base case that terminates the recursion
C Calling the function multiple times
D Using loops instead
Correct Answer:  B. Base case that terminates the recursion
EXPLANATION

A base case (or termination condition) is essential in recursion to stop the function from calling itself indefinitely, preventing stack overflow errors.

Take Test
Q.579 Medium TCS Questions
A software engineer at TCS needs to optimize a search operation in a large database containing 1 million records. Which data structure would be most efficient?
A Unsorted Linked List with O(n) search time
B Binary Search Tree or Hash Table with O(log n) or O(1) average time
C Stack with LIFO property
D Queue with FIFO property
Correct Answer:  B. Binary Search Tree or Hash Table with O(log n) or O(1) average time
EXPLANATION

For searching in large datasets, Binary Search Trees provide O(log n) complexity and Hash Tables provide O(1) average case, both significantly better than linear search in unsorted structures.

Take Test
Q.580 Easy TCS Questions
In TCS recruitment process 2024-25, candidates typically face four rounds. What is the primary purpose of the technical round?
A To assess coding skills, data structures, and problem-solving abilities
B To evaluate only communication skills
C To check personality traits
D To verify educational certificates
Correct Answer:  A. To assess coding skills, data structures, and problem-solving abilities
EXPLANATION

The technical round evaluates candidates' programming proficiency, understanding of data structures, algorithms, and their ability to solve complex problems under time constraints.

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