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?

Answers were Sorted based on User's Feedback



Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers..

Answer / x

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

Is This Answer Correct ?    3 Yes 1 No

Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers..

Answer / gopi

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

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More OOPS Interview Questions

which feature are not hold visual basic of oop?

0 Answers   Ignou,


Why static Function is used in C++?

4 Answers   TCS,


How do you explain polymorphism?

0 Answers  


What is data binding?

4 Answers   Ittiam Systems,


Which is the best institute in hyderabad for C/C++ and it also has fast track course structure.

13 Answers   Wipro,


i had specified the access specifier for abstarct class member like (pure virtual function) as private.But it can be accessed by the derived class.How the private member of one class is accessed by other class.if any body face this problem and found the solution plz reply to me.

1 Answers   Syntel,


WHAT'S THE OOPS BASIC OOPS CONCEPTS IN DOTNET

1 Answers  


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

0 Answers  


What is destructor in oop?

0 Answers  


what are the realtime excercises in C++?

0 Answers   IBM, Wipro,


How Do you Code Composition and Aggregation in C++ ?

3 Answers   IBM, NET,


What is polymorphism what are the different types of polymorphism?

0 Answers  


Categories