Add office photos
TCS logo
Engaged Employer

TCS

Verified
3.7
based on 89.7k Reviews
Video summary
Filter interviews by
Clear (1)

20+ TCS Front end Developer Interview Questions and Answers

Updated 17 Jan 2025

Q1. Allocate Books Problem Statement

Given an array of integers arr, where arr[i] represents the number of pages in the i-th book, and an integer m representing the number of students, allocate all the books in suc...read more

Ans.

Allocate books to students in a way that minimizes the maximum number of pages assigned to a student.

  • Iterate through possible allocations and calculate the maximum pages assigned to a student.

  • Find the minimum of these maximums to get the optimal allocation.

  • Return the minimum pages allocated in each test case, or -1 if not possible.

Add your answer
right arrow

Q2. Do you know about React middlewares? why are they used?

Ans.

React middlewares are functions that intercept and modify requests and responses in a React application.

  • Middlewares are used to add additional functionality to an application without modifying the core code.

  • They can be used for authentication, logging, error handling, and more.

  • Examples of React middlewares include Redux Thunk, Redux Saga, and React Router.

  • They are typically implemented using higher-order functions.

  • Middlewares can be chained together to create a pipeline of fu...read more

Add your answer
right arrow

Q3. What is Redux, and what are the differences between Redux and Context?

Ans.

Redux is a predictable state container for JavaScript apps. It helps manage the state of an application in a centralized way.

  • Redux is a state management library commonly used with React to manage the state of an application.

  • It follows a unidirectional data flow pattern, where the state is stored in a single store and changes are made through actions and reducers.

  • Redux allows for a more structured way of managing state compared to local component state in React.

  • Context, on the...read more

Add your answer
right arrow

Q4. What are JavaScript closures, the temporal dead zone (TDZ), hoisting, and the JavaScript engine?

Ans.

JavaScript closures, TDZ, hoisting, and the JavaScript engine are key concepts in understanding how JavaScript works.

  • JavaScript closures are functions that have access to variables from their outer scope even after the outer function has finished executing.

  • Temporal Dead Zone (TDZ) is the period between entering a scope and the variable being declared where accessing the variable results in a ReferenceError.

  • Hoisting is the JavaScript behavior where variable and function declar...read more

Add your answer
right arrow
Discover TCS interview dos and don'ts from real experiences

Q5. What is the difference between visibility: hidden and display: none in CSS?

Ans.

visibility: hidden hides an element but still takes up space, while display: none hides an element and removes it from the flow of the document.

  • visibility: hidden hides the element but it still occupies space on the page

  • display: none hides the element and removes it from the document flow

  • visibility: hidden elements are still rendered, just not visible

  • display: none elements are not rendered at all

Add your answer
right arrow

Q6. what is box model? What is Clousers ? let var and const difference

Ans.

Box model is a concept in CSS where every HTML element is considered as a rectangular box with content, padding, border, and margin.

  • Content is the actual content of the element

  • Padding is the space between the content and the border

  • Border is the line that surrounds the padding and content

  • Margin is the space between the border and the adjacent elements

  • Box-sizing property can be used to change the default box model behavior

Add your answer
right arrow
Are these interview questions helpful?

Q7. Do you know about React Native Context Api?

Ans.

Yes, React Native Context API is a way to manage global state in React Native applications.

  • Context API allows passing data through the component tree without having to pass props down manually at every level.

  • It is useful for managing global state such as user authentication, theme, and language preferences.

  • Context API consists of two parts: the Provider component and the Consumer component.

  • The Provider component is used to wrap the components that need access to the global st...read more

Add your answer
right arrow

Q8. Is multiple inheritance supported in Java

Ans.

No, Java does not support multiple inheritance.

  • Java only supports single inheritance through classes.

  • However, multiple inheritance can be achieved through interfaces.

  • Diamond problem can be avoided in interfaces by implementing default methods.

  • Example: class A extends B implements C, D {}

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. React Native Functional components lifecycle methods?

Ans.

React Native functional components have limited lifecycle methods compared to class components.

  • Functional components use useEffect() instead of componentDidMount() and componentDidUpdate()

  • useEffect() can be used to handle component mount, update, and unmount

  • useEffect() takes a callback function and an array of dependencies as arguments

  • The callback function can return a cleanup function to handle component unmount

  • Functional components do not have access to shouldComponentUpdat...read more

Add your answer
right arrow

Q10. What is api? Application programming interface collect the backend data show the UI

Ans.

API stands for Application Programming Interface. It is a set of rules and protocols that allows different software applications to communicate with each other.

  • APIs define the methods and data formats that applications can use to request and exchange information.

  • They allow developers to access the functionality of a system or service without needing to understand its internal workings.

  • Examples of APIs include Google Maps API for embedding maps in websites, Twitter API for acc...read more

Add your answer
right arrow

Q11. Sql server stored procedure and functions

Ans.

SQL Server stored procedures and functions

  • Stored procedures are precompiled SQL statements that can be executed with parameters

  • Functions return a single value and can be used in SQL statements

  • Both can improve performance and security by reducing network traffic and preventing SQL injection attacks

Add your answer
right arrow

Q12. What are spread and rest operator

Ans.

Spread operator allows an iterable to be expanded in places where zero or more arguments are expected. Rest operator collects all the remaining elements into an array.

  • Spread operator is denoted by three dots (...)

  • Spread operator can be used to copy an array or object

  • Rest operator is also denoted by three dots (...) and is used in function parameters to collect all remaining arguments into an array

Add your answer
right arrow

Q13. What is front end development

Ans.

Front end development is the creation of the user interface and user experience of a website or application.

  • Involves HTML, CSS, and JavaScript

  • Focuses on the visual and interactive aspects of a website or application

  • Requires knowledge of design principles and user behavior

  • Examples include creating responsive layouts, implementing animations, and optimizing performance

Add your answer
right arrow

Q14. Css full form and html full form

Ans.

CSS stands for Cascading Style Sheets and HTML stands for HyperText Markup Language.

  • CSS - Cascading Style Sheets is used for styling web pages

  • HTML - HyperText Markup Language is used for creating the structure of web pages

Add your answer
right arrow

Q15. What is props in react?

Ans.

Props in React are read-only properties that are passed from a parent component to a child component.

  • Props allow data to be passed down the component tree.

  • Props are immutable and cannot be changed by the child component.

  • Props are accessed in the child component using this.props.

Add your answer
right arrow

Q16. Tell about Angular new versions

Ans.

Angular releases new versions regularly with updates and improvements.

  • Angular follows a semantic versioning scheme with major, minor, and patch updates.

  • Major updates introduce breaking changes and new features.

  • Minor updates add new features and improvements.

  • Patch updates include bug fixes and minor enhancements.

  • For example, Angular 10 introduced stricter types, improved performance, and updated dependencies.

Add your answer
right arrow

Q17. what is state and props

Ans.

State and props are two important concepts in React for managing and passing data between components.

  • State is used to store and manage data within a component. It is mutable and can be updated using setState() method.

  • Props (short for properties) are used to pass data from parent to child components. They are immutable.

  • State is internal to a component, while props are external and passed down from parent components.

  • Example: State can be used to store form input values, while p...read more

Add your answer
right arrow

Q18. Difference b/w props and state?

Ans.

Props are used to pass data from parent to child components, while state is used to manage data within a component.

  • Props are read-only and cannot be modified by the component receiving them.

  • State is mutable and can be changed by the component that owns it.

  • Props are passed down from parent components, while state is managed locally within a component.

  • Example: Passing a user's name as a prop to a child component vs. storing the user's input in a form field as state.

Add your answer
right arrow

Q19. what are pure functions

Ans.

Pure functions are functions that always return the same output for the same input and have no side effects.

  • Always return the same output for the same input

  • Have no side effects, meaning they do not modify external state or variables

  • Pure functions are predictable and easier to test and debug

Add your answer
right arrow

Q20. How to create loops

Ans.

Loops are used to repeatedly execute a block of code until a certain condition is met.

  • Use 'for' loop to iterate over a block of code a specified number of times

  • Use 'while' loop to execute a block of code as long as a specified condition is true

  • Use 'do...while' loop to execute a block of code once, and then repeat the loop as long as a specified condition is true

Add your answer
right arrow

Q21. Explain about react js?

Ans.

React JS is a JavaScript library for building user interfaces.

  • React is component-based, allowing for reusable UI elements.

  • Uses a virtual DOM for efficient updates to the actual DOM.

  • Supports server-side rendering for improved performance.

  • Uses JSX syntax to write HTML within JavaScript code.

  • State management is handled using props and state.

Add your answer
right arrow

Q22. Explain about angular?

Ans.

Angular is a popular front-end framework developed by Google for building dynamic web applications.

  • Angular is based on TypeScript, a superset of JavaScript.

  • It uses a component-based architecture for building reusable UI components.

  • Angular provides features like data binding, dependency injection, and routing.

  • It has a powerful CLI for scaffolding and managing projects.

  • Angular has a large ecosystem of libraries and tools like Angular Material for UI components.

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at TCS Front end Developer

based on 31 interviews
3 Interview rounds
Resume Shortlist Round
Technical Round
HR Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Front end Developer Interview Questions from Similar Companies

HCLTech Logo
3.5
 • 11 Interview Questions
View all
Recently Viewed
INTERVIEWS
Tata Motors
20 top interview questions
INTERVIEWS
Wipro
10 top interview questions
CAMPUS PLACEMENT
SRM university (SRMU)
INTERVIEWS
Jio
No Interviews
INTERVIEWS
Wipro
No Interviews
INTERVIEWS
Wipro
No Interviews
INTERVIEWS
Wipro
No Interviews
CAMPUS PLACEMENT
Sastra University
INTERVIEWS
Wipro
No Interviews
INTERVIEWS
Jio
No Interviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter