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 / prasannaroy

a=10;
b=20;
b=a+b-(a=b);

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which operations are permitted on pointers?

994


How do you show the declaration of a virtual constructor?

934


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

1153


What is the full form of ios?

1059


How do you save a c++ program?

1034


What does the nocreate and noreplace flag ensure when they are used for opening a file?

1112


Write about c++ storage classes?

1188


Write a program in c++ to print the numbers from n to n2 except 5 and its multiples

2474


What are the defining traits of an object-oriented language?

1195


What are the rules about using an underscore in a c++ identifier?

1175


Is swift a good first language?

1040


How many types of comments are there in c++?

983


What is a dangling pointer in c++?

1129


Keyword mean in declaration?

1056


What does catch(…) mean?

1110