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 two numbers with out using temp variable

Answer Posted / kusum

if (a>b)
temp=a;
a=b;
b=temp;

Is This Answer Correct ?    0 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?

1949


What do you mean by early binding?

1008


What is a c++ class?

1043


What is fflush c++?

950


How does the copy constructor differ from the assignment operator (=)?

1087


Why main function is special in c++?

1056


What is the difference between method overloading and method overriding in c++?

1080


How can we check whether the contents of two structure variables are same or not?

1015


What is implicit pointer in c++?

1028


What is the purpose of the "delete" operator?

1006


How compile and run c++ program in turbo c++?

1111


What is scope operator in c++?

1031


What is atoi in c++?

1016


Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.

2523


what is C++ exceptional handling?

1085