Would it be possible to print Hello twice using single condition?
if \"condition\"
printf (\"Hello\");
else
printf(\"World\");
Greg wrote:
No matter what you use for condition, that snippet will either print "Hello", or "World", but never both.
Well, this isn't true, but why you would want it to print both, I can't find a use case for. It's defeating the point of having an if statement. The likely "real" solution is to not use an if at all. Silly interview questions... :)