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

class java
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 ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes are occupied by near, far and huge pointers (dos)?

1153


What is the modulus operator?

1204


What do you mean by invalid pointer arithmetic?

1069


Why c language?

1054


Who developed c language and when?

1059


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2171


What is the difference between int main and void main?

1042


How many data structures are there in c?

1112


What is queue in c?

1096


What is the use of getch ()?

1075


Place the #include statement must be written in the program?

1032


When is a “switch” statement preferable over an “if” statement?

1138


Give differences between - new and malloc() , delete and free() ?

1095


Is it acceptable to declare/define a variable in a c header?

1112


What is difference between far and near pointers?

1036