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 / anudyuti

#include <stdio.h>
int executeboth();
void main()
{
both();
}

int both()
{
static int i=0;
if(i++==0 ? executeboth():1)
{
printf ("Hello");

}
else
{
printf (" World");
}
return 0;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a list in c?

990


Can you explain the four storage classes in C?

1081


What is pointer & why it is used?

1070


Who invented bcpl language?

1134


How do you list files in a directory?

1090


What tq means in chat?

1076


What happens if a header file is included twice?

991


What is the role of && operator in a program code?

1030


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1232


how to execute a program using if else condition and the output should enter number and the number is odd only...

2224


Why double pointer is used in c?

999


How can you increase the size of a statically allocated array?

1047


What are integer variable, floating-point variable and character variable?

1190


How can I read a binary data file properly?

1097


Does c have enums?

1044