When you are in the if loop the printf statement prints the Hello and returns true. So !true is false so the printf under if is not printed and so it goes to the else part and prints the world part. Hence youget HelloWorld as output
hi dude the if else is used to tell yes or no not to tell yes & no therefore the output will be hello or world its depend on the condition k ,hw can any one tell that the output is hello world without the condtion ,plz mention the the ur promblem with clear meaning
Two iterations through the for-loop. On the first, "Hello " is displayed. On the second, "World" is displayed. Or use goto statements, as mentioned. The bigger question is why are you trying to do this?
The solution "cheats" because the "if" block does not print "Hello" as the OP clearly wanted. "HELLO" prints in the conditional test, not the block of code that is executed when the if statement is true. What really is happening is below.
There is no "else" statement in there. The OP wanted code where the "if" block prints "Hello" and the "else" block prints "World". The earlier snippet doesn't do that.
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...