Engineering Placements :: Blog


May 31, 2008

hi all these are some questions.......... i will be answering them in the next thread.... till then allow your brain to work....

Q1 int checkzero(int a[], int n)

{

int i;

for(i=0;i<n;i++)

{

    if(a[i]==0)

    {

        return(TRUE);

     }

    }     

   return(FALSE); 

}

Now it checks for every element in array a and does n comparisons to find presence of a zero element

no solve this by doing only one comparison.

 Q2 int func(int n)

    {

        if(n<=1)

         {

              return(1);

         }

         else

          return(n*func(n-2));

}

}

what will be the output of x=func(11);

 

Q3 how to check whether a no. is a power of 2? write a c code?

 

Q4 write a c function to generate the nearest integer value 

int nearestint(float f) 

Keywords: interview, interview question, power of 2

Posted by Engineering Placements - hammer | 1 comment(s)


May 23, 2008

hi all i am writing this post based on my personal experience.

I appeared for the tcs placement examination around a month ago. The written exam was held on computer.

 I flipped through the questions in each section, clicking the next button and reached the end completing all the questions. As i was about to press the submit button there was some virus problem in my system and hence i was not able to press the finish button. I reported the matter to the tcs personnel, who very confidently said " arey its not a problem your paper is evaluated question by question, so even if you dont press the finish button your score is calculated"..... I was pretty amused upon listening this reply, as all my computer logic failed to explain this reasoning given by him. Anyhow it was my first placement so i couldn't revolt. But before leaving the hall i made sure that i reported this matter to all the tcs officials present there.

After about an hour the name of shortlisted candidates for the interview were announced. Every other classmate of mine made it to the second stage except ME, which made me very sure about the fact that my computer logic hasn't faultered. I went with the placement coordinators of my college to the tcs people, and requested them to let me appear for the exam again (as its computer based so the question paper was randomly generated). 

After some degree of persuation they agreed. I cleared the written as well as both the interview rounds and now am placed in TCS.

So guys if such a problem happens with you give the tcs people this reference and let them check this post if they dont beleive.

Written exam was aptitude+english based.

These are the few question which i remember:

In the technical interview they first asked me my areas of interest, which inculed PHP,C++,data structures and operating system

First question asked was the insertion sorting problem and its advantage (always remember to say that insertion sort takes O(n) time to sort a list that is already sorted)

Then they asked about virtual memory and paging.

Then they asked me to brief them about my websites. 

Next question was  trick, they asked me the difference between "internet" and "Internet"

i told them that you mean to say a small 'i' internet and a capital 'I' internet they said yes.

so i told them the usual difference that one is our web and other is Internetwork, so one guy was constantly smiling and said tell me a bigger difference, tell me a major difference. i said thats all. So the person said one is an internet with capital'I' and other is a small one.

i replied yes sir thats what i told you initially. Anyways it was a very light interview with a lot of knowledge sharing .

The next was the HR interview. they asked me few questions about how to be a good communicator, how to handle your team members and few other general questions. 

That was my experience of tcs (will be sharing other company's experiences shortly). 

Thank you 

Keywords: interview, TCS, TCS interview

Posted by Engineering Placements - Anshul Malik | 0 comment(s)