Code: void main() { if(CONDITION) printf("Hello "); else printf("World"); } Replace CONDITION with such a condition that both the printf statements get executed. You can't have a loop or other things in main() According to my knowledge it's not possible. But if it is possible, please let me know. Thanks
A single if-else with a condition cannot take both branches. It's not an interesting question, it's a silly question.
Nothing tricky about it. It's silly. Your amazing solution only has one printf statement so it can't possibly That isn't a trick; that's being unable to read and comprehend.
DaWei....there are still two printf statements that get get executed.....one that prints hello and other that prints world.......so i think there is no problem in reading neither in comprehension.....