Microsoft Interview Question
Software Engineer / DevelopersHow come MS asked such a simple question??
Anyways for guys with doubts, I ran the program and confirmed it.
It prints 3 5 7 11 13.
i.e.from the left it prints
the sum of 1 digit, 3
the sum of 2 digits, 3+2=5
the sum of 3 digits, 5+2=7
the sum of 4 digits, 7+4=11
the sum of 5 digits, 11+2=13
2+find(3224);
- varun April 27, 20114+find(322);
2+find(32);
2+find(3);
3+find(0);
3+0=3;
2+3=5;
2+5=7;
4+7=11;
2+11=13;