Wednesday, December 23, 2009

Intern Interviews

I am happy to announce that I landed into Internship at Microsoft. It would be a 2 month Internship at Microsoft's Hyderabad IT Centre in Summer Vacations. Before that I did give 2 interviews for Intern at Goldmann Sachhs and Amazon about which I will be discussing. Goldmann Sachhs.... This company I should say rather very unorganized kind of Inteview ...whatever it may be its over. First we had written test(aptitude test)....in which very silly questions were asked like whats the angle when this is the time in the clock types....the question paper gave us a hint was how quick we were ...when asked such questions.....quite easy one there were also questions like on programming given flow charts ....tell output...some on programming language concepts....some asking output of C code...one in which I remember is this one.  
int main() 



fork(); 

print("Hello!!");

fork(); 

fork(); 

}  

Here he asked for what is the nof of "Hello!!" string that would be printed...most give the answer is 2 but the correct answer ( dont worry I hav checked my answer) is 8. The reason is implicit stack(or the stack that we do not create but the runtime environment creates for printf function), stack do not put the strings or the chars until and unless it gets to know that the entire line on which chars are being put in the stack overflow. Whenever this happens it outputs it to the console. Here abscence of the '/n' (newline character) is the cause for many people being wrong. If the string had ended with a '/n' then the answer would have been 2 but in this case its 8 (2^3).


I think I may have done something wrong in my Interview only. I was giving wrong answers and taking time for most simple questions. He asked to write syntax for new() function. Code for reversal of linked lists(physical one not by replacing or swapping data). Then he moved on to questions like where do u see yourself after 5 years ..... Microsoft has yet to come to Campus,if you get into Microsoft(he meant to suppose I got thru in GS....thank god I didnt get thru) which one you would choose etc. etc. I remmeber myself feeling very much vulnerable,tensed etc etc I blame that for my lapse or else everything would have been better whatever its over and I am happy .
Next two posts in few days I will discuss about Amazon and MS. Keep looking... :)

No comments:

Post a Comment