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

Explain that why C is procedural?

1105


Distinguish between actual and formal arguments.

1033


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1018


Do you know the difference between malloc() and calloc() function?

1026


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1694


Tell me when is a void pointer used?

1132


What does a function declared as pascal do differently?

1081


Why is it that not all header files are declared in every C program?

1168


What is structure padding and packing in c?

1028


Why malloc is faster than calloc?

1028


What is the purpose of 'register' keyword in c language?

992


which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above

2025


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1204


Why string is used in c?

973


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1114