Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 write data files which can be read on other machines with different word size, byte order, or floating point formats?

973


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4179


What is a union?

977


write an algorithm to display a square matrix.

2638


What is an array? What the different types of arrays in c?

1100


How we can insert comments in a c program?

1068


How many levels deep can include files be nested?

1095


What is pointer to pointer in c language?

1046


Hi can anyone tell what is a start up code?

1999


What is c language and why we use it?

999


How can I implement sets or arrays of bits?

987


What are types of functions?

969


Define macros.

1219


Explain the binary height balanced tree?

1122


Who is the main contributor in designing the c language after dennis ritchie?

950