Home Subjects Placement Papers TCS Questions

Placement Papers
TCS Questions

TCS, Infosys, Wipro, Cognizant actual papers

100 Q 10 Topics Take Test
Advertisement
Difficulty: All Easy Medium Hard 21–30 of 100
Topics in Placement Papers
Q.21 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.22 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.23 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.24 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.25 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.26 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
Q.27 Easy TCS Questions
TCS announced a special bonus structure in 2024. Which of the following best describes TCS's primary business focus?
A IT Services, Consulting, and Business Solutions
B Manufacturing and Heavy Industries
C Retail and E-commerce
D Banking and Financial Services only
Correct Answer:  A. IT Services, Consulting, and Business Solutions
EXPLANATION

TCS (Tata Consultancy Services) is a global IT services and consulting company with diverse business segments including IT services, consulting, and enterprise solutions.

Take Test
Q.28 Hard TCS Questions
In a graph with 5 vertices and 7 edges, what type of graph is it most likely to be?
A Tree
B Sparse graph
C Dense graph
D Disconnected graph
Correct Answer:  B. Sparse graph
EXPLANATION

With 5 vertices, maximum edges = 10. With 7 edges, it's sparse (closer to tree structure than dense).

Take Test
Q.29 Easy TCS Questions
TCS has how many employees (approximately) as of 2024-25?
A 200,000
B 400,000
C 600,000
D 800,000
Correct Answer:  C. 600,000
EXPLANATION

TCS employs over 600,000 people globally, making it one of the largest IT service providers.

Take Test
Q.30 Medium TCS Questions
If you have an array [3,1,4,1,5,9,2,6], what is the median?
A 3.5
B 4
C 3
D 5
Correct Answer:  A. 3.5
EXPLANATION

Sorted: [1,1,2,3,4,5,6,9]. Median of 8 elements = (3+4)/2 = 3.5

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