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

write a program to swap Two numbers without using temp variable.

Answer Posted / rohan

four Types with single statements:

1.b=(a+b)-(a=b);

2.a^=b^=a^=b;

3.a=a+b;
b=a-b;
a=a-b;

4.a=a*b;
b=a/b;
a=a/b;


rohanraju143@gmail.com from NIT Waramgal

Is This Answer Correct ?    18 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why C language is a procedural language?

997


What is floating point constants?

1098


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

1922


What are reserved words with a programming language?

1091


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

1168


Why do some versions of toupper act strangely if given an upper-case letter?

1055


What is spaghetti programming?

1097


What does a pointer variable always consist of?

1061


What are global variables?

1143


What are the advantages of c preprocessor?

1225


Does free set pointer to null?

971


What is "Hungarian Notation"?

1056


What is #include stdlib h?

1079


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

1006


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

2069