TCS Technical Interview Questions With Answers

Here are some TCS Interview Questions

1.JAVA is Object-Oriented while C is procedural.

2.Java is an Interpreted language while C is a compiled language.

3.C is a low-level language while JAVA is a high-level language.

4.C uses the top-down approach while JAVA uses the bottom-up approach.

5.Pointer go backstage in JAVA while C requires explicit handling of pointers.

6.The Behind-the-scenes Memory Management with JAVA & The User-Based Memory Management in C.

7.JAVA supports Method Overloading while C does not support overloading at all.

8.Unlike C, JAVA does not support Preprocessors, & does not really them.

9.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 -&nbspThis website is for sale! -&nbspSystem Resources and Information..read functions.

10.Exception Handling in JAVA And the errors & crashes in C.

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 library (lib).

4.What are the different storage classes in C ?

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

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

6.How do you print an address ?

Use %p in printf to print the address.

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

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

9.What is an object?

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

10.What is a class?

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

 

Set 2

 

1. What is your strongest programming language?

You should tell about your favourite programming language and be prepared with questions based on that.

2. Differences between C and Java?

1. JAVA is Object-Oriented whereas C is procedural.

2. Java is an Interpreted language whereas C is a compiled language.

3. C is a low-level language and JAVA is a high-level language.

4. C makes use of top-down approach while JAVA uses a bottom-up approach.

5. Pointer goes backstage in JAVA and C needs handling of pointers.

6. JAVA supports Method Overloading while C does not support overloading at all.

7. Exception Handling is in JAVA while errors and crashes in C.

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

This is a very common and definite, technical interview questions and answers for TCS IT job.

Functions are declared within a header file. The function prototypes exist in a header file, and not function bodies. They are defined in the library.

4. Name the different storage classes in C?

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

5. What is static variable?

Static is an access qualifier. When a variable is declared as static, the scope is limited to the function, but it would remain for the lifetime of the program.

6. How do you print an address?

Apply %p in printf to print the address.

7. What are macros? What are its benefits and limits?

Macros are processor directive which gets replaced at compile time.

The limitation is that they can replace the code they do not function summon. And the benefit is that they can lower time to replace the same values.

8. Differentiate between pass by reference and pass by value?

Pass by value sends value from a caller to summoning the function so the called function cannot change the values in caller function. But Pass by reference can pass an address to the caller function instead of value if called function requires editing any value it can directly modify.

9. Define an object?

An object is a bundle of variables and methods. Objects have both state and behavior

10. Define a class?

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

11. What is a pointer?

The pointer is a variable in a program, the value can vary. The way a compiler and a linker handles is that assigns a specific block of memory within the computer to hold the value of that variable.

12. Differentiate between null and void pointers.

A Null pointer has a value of 0. A void pointer is a generic pointer introduced by ANSI.