In this article you will know about TCS interview questions with answers and tips to crack TCS Interview – Guidelines – TCS Technical & HR Interview

Before the Interview:

1. Visit the company’s website

  • Be able to articulate what you learned including your understanding of the mission and philosophy
  • Know what the organization offers including services and product lines
  • Employers expect you to know what the organization is and what it does and how that fits into your employment plans

2. Perfect Your Resume

  • Employers will only consider resumes and cover letters that are flawless in format, grammar, and spelling
  • Resumes should also be tailored to the specific job for which you have applied and should emphasize relevant work experience and academic qualifications

3. Professional dress requirements

  • Conservative dark suit (Men and women, tie for men)
  • Polished closed-toe dress shoes
  • Conservative hair style
  • Minimal make-up
  • No visible body piercing, tattoos

Coding Test:

1. What are command line arguments?

It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments.

The command line arguments are handled using main() function arguments where argc refers to the number of arguments passed, and argv[] is a pointer array which points to each argument passed to the program.

2. How to use command line arguments in programs?

Syntax: int main(int argc, char **argv[]) { /* … */ }

argc (ARGument Count) is int and stores number of command-line arguments passed by the user including the name of the program. So if we pass a value to a program, value of argc would be 2 (one for argument and one for program name)

The value of argc should be non-negative.

argv(ARGument Vector) is an array of character pointers listing all the arguments.

If argc is greater than zero,the array elements from argv[0] to argv[argc-1] will contain pointers to strings.

Argv[0] is the name of the program , After that till argv[argc-1] every element is command -line arguments.

For better understanding run this code on your machine.

// Name of program mainreturn.cpp

#include <iostream>

using namespace std;

int main(int argc, char** argv)


    cout << “You have entered ” << argc

         << ” arguments:” << “\n”;

    for (int i = 0; i < argc; ++i)

        cout << argv[i] << “\n”;

    return 0;


3.What are the programming languages allowed for TCS coding test?

Only c programming language is allowed in TCS coding test

Technical Interview:

1. In header files whether functions are declared or defined?

Functions are declared within header file. That is function prototypes exist in a header file,not function bodies. They are defined in the library (lib).

2. What are the different storage classes in C?

There are four types of storage classes in C. They are extern, register, auto and static

3. What does static variable mean?

Static is an access qualifier. If a variable is declared as static inside a function, the scope is limited to the function,but it will exists for the life time of the program. Values will be persisted between successive calls to a function

4. How do you print an address?

Use %p in printf to print the address.

5. What are macros? what are its advantages and disadvantages?

Macros are processor directive which will be replaced at compile time.

The disadvantage with macros is that they just replace the code they are not function calls. similarly the advantage is they can reduce time for replacing the same values.

6. Difference between pass by reference and pass by value?

Pass by value just passes the value from caller to calling function so the called function cannot modify the values in caller function. But Pass by reference will pass the address to the caller function instead of value if called function requires to modify any value it can directly modify.

7. What is an object?

Object is a software bundle of variables and related methods. Objects have state and behavior

8. What is a class?

Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.

9. What is the difference between class and structure?

Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also.

The major difference is that all declarations inside a structure are by default public.

Class: Class is a successor of Structure. By default all the members inside the class are private.

10. What is pointer?

Pointeris a variable in a program is something with a name, the value of which can vary. The way the compiler and linker handles this is that it assigns a specific block of memory within the computer to hold the value of that variable.

11. What is the difference between null and void pointer?

A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI. Generic pointer can hold the address of any data type.

12. What is function overloading

Function overloading is a feature of C++ that allows us to create multiple functions with the same name, so long as they have different parameters.Consider the following function:

int Add(int nX, int nY)


return nX + nY;


13. What is function overloading and operator overloading?

Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions of the same name that perform similar tasks but on different data types.

Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn’t add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).

14. Const char *p , char const *p What is the difference between the above two?

1) const char *p – Pointer to a Constant char (‘p’ isn’t modifiable but the pointer is)

2) char const *p – Also pointer to a constant Char

However if you had something like:

char * const p – This declares ‘p’ to be a constant pointer to an char. (Char p is modifiable but the pointer isn’t)

Tips to crack Technical Interview:

  • Be strong in your Area of Interest
  • Your academic projects and mini projects take a major role in your technical interview
  • Irrespective of your technical role, be very strong in the basics of the programming language
  • Be ready to say NO I don’t know. Interviewers are not gauging you with the correct answers that you provided. They are gauging you based on how open you are to learn new areas.
  • Be concise on the answers. Do not add extra word arts to explain the basic answer
  • Do not beat the bush by saying irrelevant answers or asking question that does not make sense. When you do this, any interviewer will immediately put negatives in their score card.

Personal Interview:

1. Tell me about yourself

Describe yourself professionally, not personally

Consider your answer a one-minute commercial about you

State your skills and experience and how they relate to the position

2. How did you learn about our company?

By researching the organization’s web site, you will be able to articulate knowledge of the company

3. Describe a problem you solved in the classroom or at work and what you learned from this experience.

Behavioural questions are asked because your past experience can predict future behaviour

Always state the outcomes of your experiences – what did you learn?

4. Why should I consider you a strong applicant for this position?

Articulate how your skills relate to the position

5. Describe your weakness?

  • Recognize a deficient skill, not a character flaw
  • Choose something that will not affect your ability to do the job
  • Changing a weakness to a positive makes you stand out in a crowd

6. Why Tcs?

  • Goto company website and study their recent projects related to your background.
  • Contact your seniors and ask what is so special about the company.
  • Check how the company helps you achieve your career goals and how you can help the company grow
  • Don’t praise the company

7. Why should I hire you?

I carefully cross checked my skills verses the requirements of the posting for which I’m being interviewed by you.  I have full confidence that I will be a good fit if considered because I will be in a position to start working with the project teams quickly and do my best to deliver quality work once I’m given the job.


These are all the Guidelines – Tcs technical & Hr interview.



Related Posts