How to swap two variables, without using third variable ?

Answer Posted / mohit

x = x + y;

y = x - y;

x = x - y;

Is This Answer Correct ?    113 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sir... please give some important coding questions asked by product companies..

1796


Design an implement of the inputs functions for event mode

2959


how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.

2136


What is full form of PEPSI

1865


To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

494






What is data _null_? ,Explain with code when u need to use it in data step programming ?

2821


Write a routine to implement the polymarker function

4377


3) Int Matrix of certain size was given, We had few valu= es in it like this. =97=97=97=97=97=97=97=97=97=97=97 1 = | 4 | | 5 | &= nbsp; | 45 =97=97=97=97=97=97=97=97=97=97=97 &n= bsp; | 3 | 3 | 5 | = | 4 =97=97=97=97=97=97=97=97=97=97=97 34 |&nbs= p; 3 | 3 | | 12 | &= nbsp; =97=97=97=97=97=97=97=97=97=97=97 3 | &nbs= p; | 3 | 4 | = | 3 =97=97=97=97=97=97=97=97=97=97=97 3 | = ; | | | = ; 3 | =97=97=97=97=97=97=97=97=97=97=97 &= nbsp; | | 4 | = ; | 4 | 3 We w= ere supposed to move back all the spaces in it at the end. Note: = If implemented this prog using recursion, would get higher preference.

3318


how to test pierrot divisor

2257


Cluster head selection in Wireless Sensor Network using C programming language.

3107


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

3709


could you please send the program code for multiplying sparse matrix in c????

3068


write a simple calculator c program to perform addition, subtraction, mul and div.

3143


What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql

2407


Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

2683