My experience Microsoft conducted on 22nd December, 2010.
First round was a written test of an hour. There were 6 questions (4 programming and 2 test cases) 10 marks each.
1) Find output of following code?
2) Write a program that takes a no. from user and prints the no. subtracting 5 each time from the no. till the no. doesnt crosses/reaches 0.And again prints the nos. Now increasing 5 each time till the no. doesnt reaches/crosses original no. Don,t use any loops or goto stmnt. And don,t declare any local variables.
Ans: use recursion.
3) Convert a no. from string to integer.
convert to int a=1234;
4) Find the subarray of an array that has the greatest sum? Array contains both +ve as well as -ve nos.
Ans: I did it using 3 loops but when I went for the 2nd technical round the interviewer told me a very simple and optimal program for the same.