![]() |
Interesting C Question
Code:
void main()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 |
Re: Interesting C Question
printf("World"); would be nice option
|
Re: Interesting C Question
thaks
|
Re: Interesting C Question
A single if-else with a condition cannot take both branches. It's not an interesting question, it's a silly question.
|
The answer is....
condition --->if(!printf("hello"))
|
Re: Interesting C Question
Well dawei......that is not a silly question......actually that's a tricky question...... ;)
|
Re: Interesting C Question
Nothing tricky about it. It's silly. Your amazing solution only has one printf statement so it can't possibly
Quote:
|
Re: Interesting C Question
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..... :)
|
| All times are GMT +5.5. The time now is 00:01. |