main()
{
unsigned int i=10;
while(i-->=0)
printf("%u ",i);
}
Answer:
10 9 8 7 6 5 4 3 2 1 0 65535
65534…..
Explanation:
Since i is an unsigned
integer it can never become negative. So the expression i-- >=0 will always be true, leading to an infinite
loop.
Blog Author: Vijay Kumar
Go to: Java Aptitude, C C++ Aptitude
No comments:
Post a Comment