Good interview Questions
For the above code i complied and the answer also given
MY Expected output was :5,5,1
But after compling the output was :5,20,1
I didn't understand the logic for that output obtained
Can anybody give the reason for that output
I would expect a compile error, but it is probably due to a typographical error on your part (x< <2 should be x << 2). Why do you think the second integer to be printed should be 5 instead of 20?
Thanks for reply
i saw the solution that was given by you, i understand the logic .
Thanks for spending your valuable time with me