The code is::::: if(condition)
Printf("Hello");
Else
Printf("World");
What will be the condition in if in such a way that both
Hello and world are printed in a single attempt?????? Single
Attempt in the sense... It must first print "Hello" and it
Must go to else part and print "World"..... No loops,
Recursion are allowed........................

Answer Posted / hari nair

What 'bout this???

If(printf("Hello")
{
printf("Hello");
}
else
printf("World");


//printf returns the no. of arg printed, as no arg printed in if condition, goes straight to the else clause....

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I make it pause before closing the program output window?

577


Explain the difference between ++u and u++?

634


What do you mean by dynamic memory allocation in c? What functions are used?

651


What the different types of arrays in c?

610


Is flag a keyword in c?

677






Difference between malloc() and calloc() function?

652


How can you check to see whether a symbol is defined?

586


What is the easiest sorting method to use?

632


Explain about C function prototype?

604


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

613


What are pointers? Why are they used?

627


Explain the difference between malloc() and calloc() function?

597


What is declaration and definition in c?

523


What is the difference between union and structure in c?

570


What is #include stdio h and #include conio h?

598