Monday, October 24, 2011

TCS interview questions and answers for freshers 2011-2012 Latest

Hi friends,

Recently TCS has conducted various campus drive in lots of colleges and selected students in huge quantity.I have collected lots of interview questions from various sites which is asked by TCS in 2011-2012 on campus placement drive.

I want to share these questions with you with solutions.Hope these will help to you in future TCS placement drive for 2011-2012 freshers.
All the Best!!!


Below are few basic questions that can be expected on TCS interviews. These are not hard to answer but a good preparation is necessary so that you don't miss any.

Interview Question 1 :

1) What is the prime difference between While and Do While Loop ?

Answer :

Though while and do-while are loop statements, in Do While it is assured that the statements within the loop will be executed at least once (even if the condition fails.)

Interview Question 2 :

2) What is the difference between a = ++b and a = b++ ?

Answer :

The first statement a = ++b can be broken down into two statements b = b + 1 followed by a = b. Hence b will be incremented first and will be assigned to a. Hence values of a and b will be same at the end.

The second statement a = b++ can be broken down into two statements a = b followed by b = b + 1. Hence b will be assigned to a. Only after this assignment b will be incremented. Hence values of a and b will be different at the end.

Interview Question 3 :

3) A C program is compiled into native (binary) code by the compiler. Similary what will be generated out of JAVA program source by JAVA compiler ?

Answer :

JAVA program will get compiled into bytecode instead of native (binary) code.

Interview Question 4 :

Practive Question For Your Thought :

Given a for statement for(i = 1;i < 10;i++)
{
printf("hello");
}
Now you can try by yourself rewriting the same logic using while statement.



2 comments: