But why would you do that?

L B (3806)
This has to be my favorite "But why would you do that?" piece of code:
1
2
3
4
int main()
{
    do return 0; while(false);
}
What's your favorite? (any language)
BHXSpecter (982)
A friend of mine, while learning C++, wrote a 100+ line file of uninitialized variables and then did while(true){return 0;} ......last I knew he gave up on programming. Always wondered why he bothered typing that much just to do that, even if it was for learning.
Registered users can post here. Sign in or register to post.