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

is there any choice in opting subjects like 4 out of 7

0 Answers  


what is the difference between class and object?

9 Answers  


What is conditional Compilation?

3 Answers   emc2, HCL,


What is encapsulation with example?

0 Answers  


Whats is abstraction in oops?

0 Answers  


what is oops

4 Answers   DELL,


Write 7 differences between "Public" function and "Private" function?

2 Answers   IBM, Wipro,


What is polymorphism give a real life example?

0 Answers  


what is static?

4 Answers  


What is multiple inheritance ?

17 Answers   Blue Star, C DAC, CDAC, Impetus, Ness Technologies, Softvision Solution,


how do u initialize the constant variables

5 Answers   IBM, Siemens,


What does and I oop mean?

0 Answers  


Categories