Add office photos
Engaged Employer

Synechron

3.6
based on 2.7k Reviews
Filter interviews by

10+ TCS Interview Questions and Answers

Updated 8 Oct 2024
Popular Designations

Q1. Ngrx state management, how do you manage state in your current project?

Ans.

I use Ngrx for state management in my current project by defining actions, reducers, effects, and selectors.

  • Define actions to describe user events or interactions

  • Create reducers to specify how state should change in response to actions

  • Implement effects to manage side effects like API calls

  • Use selectors to retrieve specific pieces of state for components

Add your answer

Q2. Would transaction be rolled back if innermost stored procedure throws an error ?

Ans.

Yes, the transaction will be rolled back if the innermost stored procedure throws an error.

  • If an error occurs in the innermost stored procedure, it will cause the entire transaction to be rolled back.

  • This ensures that the database remains in a consistent state.

  • Rolling back the transaction means that any changes made by the stored procedures within the transaction will be undone.

Add your answer

Q3. Write a query to identify and remove duplicated from a table.

Ans.

Use a query with GROUP BY and HAVING clause to identify and remove duplicates from a table.

  • Use GROUP BY to group rows with the same values

  • Use HAVING COUNT(*) > 1 to identify duplicates

  • Use DELETE statement to remove duplicates

Add your answer

Q4. Dom Sanitizer in Angular

Ans.

DOM sanitizer in Angular is used to sanitize untrusted HTML to prevent XSS attacks.

  • DOM sanitizer is used to sanitize HTML content before rendering it in Angular templates.

  • It helps prevent Cross-Site Scripting (XSS) attacks by removing potentially harmful content.

  • Angular provides a built-in DomSanitizer service for sanitizing HTML content.

  • Example: Using DomSanitizer in Angular template to sanitize a URL before rendering it.

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

Q5. MVC vs .NET lifecycle

Ans.

MVC is a design pattern used in .NET development, while .NET lifecycle refers to the stages of a .NET application's execution.

  • MVC is a design pattern that separates an application into three main components: Model, View, and Controller.

  • .NET lifecycle refers to the stages of a .NET application's execution, including initialization, execution, and termination.

  • MVC helps in achieving separation of concerns and making the code more maintainable.

  • Understanding the .NET lifecycle is ...read more

Add your answer

Q6. Stored procedure vs Functions

Ans.

Stored procedures are precompiled SQL queries stored in the database, while functions are reusable code blocks that return a value.

  • Stored procedures are used for performing specific tasks or operations on the database.

  • Functions are used to encapsulate logic and can be called within SQL queries or other functions.

  • Stored procedures can have input and output parameters, while functions always return a value.

  • Stored procedures can contain DML and DDL statements, while functions ar...read more

Add your answer

Q7. NgOninit vs Constructor

Ans.

NgOnInit is a lifecycle hook in Angular that is called after the component has been initialized, while the constructor is a TypeScript feature used to initialize class properties.

  • NgOnInit is specific to Angular components, while constructor is a general TypeScript feature.

  • NgOnInit is used for initialization logic that relies on Angular's view and input bindings being initialized, while constructor is used for basic initialization of class properties.

  • NgOnInit is called after A...read more

Add your answer

Q8. Dispose vs Finalize

Ans.

Dispose is used to release unmanaged resources immediately, while Finalize is used for cleanup operations before an object is destroyed by the garbage collector.

  • Dispose is called explicitly by the developer, while Finalize is called by the garbage collector.

  • Dispose should be implemented in classes that directly interact with unmanaged resources.

  • Finalize should be implemented in classes that need to release resources before being garbage collected.

  • Example: Implement IDisposabl...read more

Add your answer

Q9. Model binder in MVC

Ans.

Model binder in MVC is used to map data from HTTP requests to action method parameters in controllers.

  • Model binder maps form data, query string parameters, and route data to action method parameters in MVC controllers.

  • It helps in simplifying the process of extracting data from HTTP requests.

  • Model binder can be customized by creating custom model binders to handle complex data binding scenarios.

Add your answer

Q10. Use of zone.js file

Ans.

zone.js is a library for managing asynchronous operations in Angular applications.

  • zone.js helps in tracking asynchronous operations and their execution context in Angular applications.

  • It provides hooks for intercepting asynchronous tasks like setTimeout, setInterval, and promises.

  • zone.js can be used for profiling, debugging, and error handling in Angular applications.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top DOT NET Developer Interview Questions from Similar Companies

4.3
 • 17 Interview Questions
3.7
 • 16 Interview Questions
2.9
 • 14 Interview Questions
3.6
 • 13 Interview Questions
3.7
 • 12 Interview Questions
3.9
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
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
Get AmbitionBox app

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