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 ensure that integer arithmetic doesnt overflow?

1255


In c language can we compile a program without main() function?

1179


Is array name a pointer?

1079


What is c++ used for today?

1154


Write a program for finding factorial of a number.

1143


What is a spanning Tree?

1660


main() { printf("hello"); fork(); }

1249


What is abstract data structure in c?

1110


What is a pointer variable in c language?

1155


Did c have any year 2000 problems?

1157


What are disadvantages of C language.

1222


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4336


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1486


Explain what are the advantages and disadvantages of a heap?

1129


Explain what are compound statements?

1105