30
if ( printf("Hello") == 0 )
printf ("Hello");
else
printf ("World");
:-)
#define CONDITION (0) if (0) {} else
or some such.
If you see such a question on an interview, run away as fast as you can! The team that asks such questions is bound to be unhealthy.
Edit - I forgot to clarify - this relies on "else" being matched with closest open "if", and on the fact that it's written as "if CONDITION" rather than if (CONDITION) - parenthesis would make the puzzle unsolvable.
if(printf("Hello") == 1)
printf("Hello")
else
printf("World")
use a goto, one of the single most underused keywords of our day