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 the main feature of oop?

1145


write a program to find 2^n+1 ?

2058


can we make game by using c

4127


What is inheritance in oop?

1028


What is the fundamental idea of oop?

1131


What makes a language oop?

1047


Can we create object of interface?

1124


How to improve object oriented design skills?

1008


What is the point of oop?

1176


Which language is pure oop?

990


Why is oop useful?

1095


write a C++ program for booking using constructor and destructor.

2533


What is the oops and benefits of oops programming?

968


How do you achieve runtime polymorphism?

1045


Can static class have constructor?

1025