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 encapsulation example?

1075


What is oops with example?

1059


Why we use classes in oop?

1051


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1934


what is the drawback of classical methods in oops?

3386


to find out the minimum of two integer number of two different classes using friend function

2149


Why is polymorphism important in oop?

1091


How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction

2148


What is class and object with example?

1141


How long to learn object oriented programming?

1102


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

3541


What is the advantage of oop over procedural language?

1093


Can main method override?

1118


What is the real time example of inheritance?

1155


What is purpose of inheritance?

1118