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

swapping program does not use third variable

Answer Posted / jayasrinivas.donavalli

class swap
{
public:
int a,b;
void swapp()
{
a = a + b;
b = a - b;
a = a - b;
}
};
class swap s1.
s1.swapp();
cout<<a<<b;

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism and example?

1004


explain sub-type and sub class? atleast u have differ it into 4 points?

2273


Where is pseudocode used?

1054


What are the 3 principles of oop?

1069


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1918


Why do we use class in oops?

930


Why is abstraction needed?

999


What are oops functions?

977


What is overriding in oops?

1071


State what is encapsulation and friend function?

1211


Can we create object of abstract class?

1045


Prepare me a program for the animation of train

2433


What are the 5 oop principles?

1083


What is difference between data abstraction and encapsulation?

1050


write a programe to calculate the simple intrest and compund intrest using by function overlading

2150