TCS
10+ Interview Questions and Answers
Given an array ‘arr’ of integer numbers . where ‘arr[i]’ represents the number of pages in the ‘i-th’ book. There are ‘m’ number of students and the task is to allocate all the books to their stud...read more
Q2. Do you know about React middlewares? why are they used?
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
Q3. what is box model? What is Clousers ? let var and const difference
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
Q4. Do you know about React Native Context Api?
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
Q5. React Native Functional components lifecycle methods?
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
Q6. What is api? Application programming interface collect the backend data show the UI
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
Q7. Is multiple inheritance supported in Java
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 {}
Q8. Sql server stored procedure and functions
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
Q9. What are spread and rest operator
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
Q10. What is front end development
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
Q11. Css full form and html full form
CSS stands for Cascading Style Sheets and HTML stands for HyperText Markup Language.
CSS is used for styling web pages and controlling their layout.
HTML is used for creating the structure and content of web pages.
CSS can be used to change the color, font, size, and spacing of elements on a webpage.
HTML uses tags to define different elements like headings, paragraphs, images, and links.
Q12. What is props in react?
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.
Q13. Tell about Angular new versions
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.
Q14. what is state and props
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
Q15. Difference b/w props and state?
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.
Q16. what are pure functions
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
Q17. How to create loops
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
Q18. Explain about react js?
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.
Q19. Explain about angular?
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.
More about working at TCS
Top HR Questions asked in null
Interview Process at null
Top Front end Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month