TCS Interview Questions For 5 to 9 Years Experience in .Net and SQL. | Frequently Asked Questions In Tcs Interview | interview Tips
TCS Interview Questions For 5 to 9 Years Experience in .Net and SQL. | Frequently Asked Questions In Tcs Interview | interview Tips
Hi readers I had recently gone through the interview, so i want to share few details with you i hape that details will help any aspirant who are preparing for tcs interview who is having 6- 9 years Experience in .NET Technologies sql and full stack development, what questioned they had asked to me, I am including this question to prepare aspirant in better way so that they can perform better in their interview:
1.Tell me about yourself in respect of work done.
Ans- Just described according my technology stack and projects done.
2.What are the delegates, why we need them?
Ans-Delegates are a way of passing functions as parameters to other functions or objects in programming. They are type-safe, meaning they can only reference methods that have the same signature as the delegate. Delegates are useful for implementing callback methods and events, which allow one object to notify another object when something happens. Delegates can also be chained together, so that multiple methods can be called on a single delegate, the main use of delegates are to implement dynamic functionality while passing function as a parameter example it can calculate mentioned things on the go and produce result accordingly.
3.What are solid principles? Explain in details.
Ans-You can refer the detailed article throw ex here
4.How we can secure web Api's?
Ans- we can secure apis by following way-
Data encryption through TLS/SSL to protect the communication between the API and the client.
Access control to restrict who can access the API and what they can do with it, by using authentication and authorization,
JWT Token using this token we can restrict users to unauthorized access.
5.What is the difference between throw and throw ex?
The difference between throw and throw ex in C# is that:
- throw rethrows the original exception and preserves its original stack trace, which means you can see where the exception was actually thrown.
- throw ex throws the original exception but resets the stack trace, which means you can only see where the exception was rethrown.
6.What is Session Timeout?
Ans-Session timeout is the event that occurs when a user does not perform any action on a website or an app for a certain period of time, and the server invalidates and destroys the user session. Session timeout is used to prevent unauthorized access or misuse of a user session by an attacker. The session timeout value can be configured by the server or the application, depending on the context and the security requirements.
7.What are Magic tables in SQL?
Ans-Magic tables are the temporary logical tables that are created by the SQL server whenever there are insertion, deletion or update operations on a table. Magic tables are not physical tables but they are just internal tables that store the recently performed operations on the rows. Magic tables are invisible or virtual tables that can only be seen with the help of triggers in the SQL server.
There are two types of magic tables in SQL server:
- INSERTED: This magic table holds the inserted values during an insert or update operation.
- DELETED: This magic table holds the deleted values during a delete or update operation.
8.What are indexes in SQL?
Ans- Indexes in SQL are like shortcuts that help you find data faster. Indexes can be different kinds. Some indexes sort the data by order. Some indexes only include some data. Some indexes store the data in columns. Some indexes use buckets to group the data. Indexes make your queries faster and easier.
There are different types of indexes in SQL, such as:
- Clustered index: This index is like data stored in dictionary in sorted order itself.
- Non-clustered index: It is like index of any book, This type of index does not affect the physical order of data in a table, but creates a separate structure that points to the data rows. There can be multiple non-clustered indexes per table.
9.How we can optimize SQL Queries?
Ans-We can optimize SQL queries by using some techniques that can improve the performance of the queries in terms of execution time, disk accesses, and other cost measures. Some of these techniques are:
- Minimize the use of wildcard characters: The use of wildcard characters, such as % and _, in SQL queries, can slow down the query execution, especially if they are used at the beginning of a string. It is better to use more specific conditions or full-text search features if possible.
- Use indexes: Indexes can speed up the query execution by allowing the database to quickly locate the data rows that match the query conditions. However, indexes also have some drawbacks, such as increasing the storage space and the time required for data modification operations. Therefore, it is important to choose the right columns and types of indexes for each table.
- Simplify the query: A complex query can be simplified by breaking it into smaller queries, using subqueries or temporary tables, eliminating unnecessary joins or conditions, and avoiding nested loops or correlated subqueries. A simpler query can be easier for the database to optimize and execute.
- Use stored procedures: Stored procedures are pre-compiled SQL statements that can be executed repeatedly with different parameters. They can reduce the network traffic between the application and the database, improve the security and maintainability of the code, and allow the database to cache and reuse the execution plans.
10.What are triggers?
Ans-Triggers in SQL are small pieces of code that automatically run when specific events happen on a table. Triggers can help to keep the data integrity, accuracy and consistency.
syntax for MS SQL-
CREATE TRIGGER trigger_name { BEFORE | AFTER } { INSERT | UPDATE | DELETE } ON table_name FOR EACH ROW trigger_body;
11.What are Design patterns which design pattern you have used?
read full article for this Design Pattern here
Read my recent experience in Walk-in drive at tcs in indore 2025
#tags-
#tcs interview questions,
#tcs interview questions for freshers,
#tcs interview questions and answers,
#tcs interview questions for experienced,
#about tcs interview questions,
#tcs interview questions coding,
#tcs interview questions for .net developer,
#tcs interview questions experienced,
#tcs interview process experienced,
#tcs interview questions for experienced .net developer,
You may also like: सरकारी नौकरी(Sarkari Naukari) : OSSSC(ओडिशा सब-ऑर्डिनेट स्टाफ सिलेक्शन कमीशन)में फॉरेस्ट गार्ड सहित 2712 पदों पर वैकेंसी, जानिये कौन कौन कर सकता है आवेदन
Leave a Reply
Please log in to comment on this post.