Saturday, January 11, 2014

First post of 2014

My version of the "2014 programming puzzle" from StackExchange:

It's not even close to the smallest one, but it's not so bad either...

C:

main(){int a=!(a^a);printf("%d%d%d%d",++a,!a,!!a,a<<!!a);}

It will probably generate some warnings when compiling, but if your compiler evaluates function parameters from left to right, then it should work!

No comments:

Post a Comment