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

Hi All,
I am new to programming and want to know how can i write a
code to take input of 2 numbers from user and swap it
without using a temp variable?

Answer Posted / gopi

a=A+b;
b=a-b;
a=a-b;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism in oop example?

1028


Is html an oop?

1072


What is difference between inheritance and polymorphism?

1029


Can main method override?

1110


How to hide the base class functionality in Inheritance?

1139


What does <> mean pseudocode?

1194


what is the sylabus for priliminaries?

2179


What is oops concept with example?

1026


Why interface is used?

1021


c++ program to swap the objects of two different classes

2422


program for insertion ,deletion,sorting in double link list

2693


can inline function declare in private part of class?

4415


How many human genes are polymorphic?

1067


What is the main purpose of inheritance law?

1199


What is the real time example of encapsulation?

1070