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


how to swap the variables without using temp and operators



how to swap the variables without using temp and operators..

Answer / santhosh

int a, b;
a = 10;
b = 20;
a = a + b;
//a=30
b = a - b;
a = a - b;

Console.WriteLine("a={0},b={1}", a, b);
Console.ReadLine();

Is This Answer Correct ?    10 Yes 2 No

Post New Answer

More OOPS Interview Questions

What is the main purpose of inheritance law?

0 Answers  


what is the difference between class to class type conversion and copy constructor ?

2 Answers  


what is difference between thread and programme.

1 Answers   NCC,


How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?

1 Answers   IntraLogic,


WAP to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

1 Answers  


Why do we use polymorphism in oops?

0 Answers  


What is Dynamic Polymorphism?

13 Answers  


polymorphism means?

6 Answers   BFL,


when my application exe is running nad i don't want to create another exe what should i do

2 Answers   HCL,


hi all..i want to know oops concepts clearly can any1 explain??

0 Answers   Eureka Forbes,


In which Scenario you will go for Interface or Abstract Class?

1 Answers   InfoAxon Technologies,


WHEN A COPY CONSTER IS CALL ?

4 Answers  


Categories