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 / abdul rahman

void main()
{
int a,b;//example a=10,b=12;
a=a~b;//a=22
b=a~b;//b=10;
a=a~b;//a=12
}


NOTE:
~=XOR operator( not able to write xor
operator so iam using this symbol which is not
correct)

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is oop better than procedural?

1093


Why do we need polymorphism in c#?

1181


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

2151


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

2552


Is data hiding and abstraction same?

1060


Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer

2163


What are the important components of cohesion?

1030


What is object in oop with example?

1254


Get me an image implementation program.

1996


What is pure oop?

1120


What is the difference between procedural programming and oops?

1149


What is variable example?

1046


What is the purpose of enum?

1019


Can we have inheritance without polymorphism?

1041


Why we use classes in oop?

1054