Hi,
I want to display hello world after compiling the below code, How can this be possible?
main()
{
if(?)
{
printf("hello");
}
else
{
printf( "world");
}
}
Is this possible by any means? what should be in place of question mark above
Hi,
I want to display hello world after compiling the below code, How can this be possible?
main()
{
if(?)
{
printf("hello");
}
else
{
printf( "world");
}
}
Is this possible by any means? what should be in place of question mark above
I don't imagine the compiler not objecting to the prior code 'cause void is not a type that can be true or false. G_d I hate these stupid code puzzles, they never seem to illuminate much! You could put a static variable in the fn, something like Virgin = 0. When the function executes the last line is Virgin =1. Virgin can be used as an index for a string table.
I don't imagine the compiler not objecting to the prior code 'cause void is not a type that can be true or false. G_d I hate these stupid code puzzles, they never seem to illuminate much! You could put a static variable in the fn, something like Virgin = 0. When the function executes the last line is Virgin =1. Virgin can be used as an index for a string table.