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...

How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance

Answer Posted / manju

main()
{
int a=16,b=19;
a=a+b;
b=a-b;
a=a-b;
printf("a and b are:%d\t%d",a,b);
}

Output:
a and b are:19 16

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what does static variable mean?

1125


What is #pragma statements?

1111


Are there constructors in c?

1021


What are the complete rules for header file searching?

1101


How many types of functions are there in c?

1158


Explain null pointer.

1133


What are types of structure?

1138


What are header files why are they important?

1105


What are multidimensional arrays?

1127


Where are some collections of useful code fragments and examples?

1170


What are volatile variables in c?

964


What is exit() function?

1034


What is the difference between formatted&unformatted i/o functions?

1066


If errno contains a nonzero number, is there an error?

1388


What’s a signal? Explain what do I use signals for?

1127