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

write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

2217


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


write a program for area of circumference of shapes

2026


Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange

2857


Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??

1768






how to test pierrot divisor

2251


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

3063


Write a program to model an exploding firecracker in the xy plane using a particle system

3683


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

2814


can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail

2320


why nlogn is the lower limit of any sort algorithm?

2369


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

1793


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

2399


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

2253


#include int main(void) { int a=4, b=2; a=b<>2 ; printf("%d",a); return 0; }

1063