Commonly Asked Technical Questions at a TCS Interview

Technical Questions for TCS Interview

The interview can take 45 minutes to an hour and may have one or two interviewers. One of them may focus on your self-management skills, communication skills, and background by asking behavioral questions. The other will be interested in your technical capabilities.

Here we are focusing on the commonly asked technical questions.

Technical Questions for TCS Interview

  1. What is your strongest programming language (Java, ASP, C, C++, VB, HTML, C#, etc.)? 

  Before the interview you must decide your favourite programming language or the language you are best at.

  1. What is the difference between C and Java?
  2. JAVA is Object-Oriented while C is procedural.
  3. Java is an Interpreted language while C is a compiled language.
  4. C is a low-level language while JAVA is a high-level language.
  5. JAVA uses the bottom-up approach while C uses the top-down approach.
  6. Pointer goes backstage in JAVA whereas C requires explicit handling of pointers.
  7. The standard Input & Output Functions–C uses the printf & scanf functions as its standard input & output while JAVA uses the System.out.print & System.in.read functions.
  1. Functions are declared or defined in header files?

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

  1. What are the different storage classes in C?

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

  1. What do you understand by static variable?

Static variable 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.

  1. How do you print an address?

Address is printed by using “%p” in “printf”.

  1. 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.

The advantage is they can reduce time for replacing the same values.

  1. What’s the difference pass by value and between pass by reference?

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 modifying any value it can directly modify.
9. What is an object?

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

  1. 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.

  1. What is the difference between structure and class?

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.

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

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

  1. 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;
}

  1. What is operator overloading and function overloading?Function overloading: C++ enables many 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.

Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes.

  1. What is encryption?Encryption is the transformation of information from readable form into an unreadable form.
  2. What is decryption?

Decryption is the reverse of encryption; it’s the transformation of encrypted data back into some readable form.

  1. What exactly is a digital signature?

A digital signature is an encrypted version of a message digest, attached together with a message. Just as a handwritten signature is affixed to a printed letter for verification that the letter originated from its purported sender, digital signature performs the similar task for an electronic message.

Tags

You may also like...

0 thoughts on “Commonly Asked Technical Questions at a TCS Interview”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>