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 values between two variables without using a
third variable?

Answer Posted / kumar

//language using C#

int a=10;
int b=20;

a=a+b;
b=a-b;
a=a-b;

thanks
Kumar
http://www.sourcecodehub.com/php/how-to-swap-values-of-two-variables-without-using-a-third-variable-integer/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

It is possible to take number of controls added to form at run-time.ex-when user enter 6, 6 text boxes get added to form,next time number of controls get change as per user number enter. What is code for that?

1930


iam confused among testing ,.net and java. can anybody help me.

1966


what are all the validation we need to perform in data stage?

2367


how do you generate source code for the automatic generation for receipt number

4625


when we use mantis? how learn mantis?

2136


Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com

2139


Q1.Write a C program which asks the user for a number between 1 to 9 and shows the  number. If the user inputs a number out of the specified range, the program should  show an error and prompt the user for a valid input.

2661


what is the current salary package in India for a lamp programmer

2288


5. Which of the following can you do with DB2 Express- C? Query databases with SQL Query databases with XML using XQuery and XPath Use SQL in Xquery and Xquery in SQL All of the above

2529


write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.

1553


how to convert infix expression to prefix expression?

4208


How can we develop a multi-tier application in Java?

1852


Write a program to reverse a number?

1131


Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.

997


if 2 is passed as an argument to the method,void GC.Collect then what would be the result?

1613