how to swap all the values without using temporary variable.
tha values r a = 20, x=60 and p=2.

Answer Posted / chaitanya

x=x^a;
a=x^a;
x=a^x;

x=x^p;
p=x^p;
x=p^x;

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In loading programs into memory, what is the difference between load-time dynamic linking and run-time dynamic linking?

1614


Plz sent me in .net 2.0 interview Question & answers?

1645


You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?

609


what is the diffrence between software and hardware language?

1828


Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.

629






How does the TCP handle the issue of multiplexing?

2404


Delta 5 weight scale not connect with oracle application what i can do?

1812


In an customer exit (include Z) program, only the last record is getting fetched. The exit is getting called after pressing save button. What to write for fetching the first record ? Before saved to a SAP table how can i call all these records in an itab in the exit ?

1517


i want to improve my english vocab for racking campus written exam plz tell me best book for prepration......

1710


I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...

2600


how many types of bytes are there???

1989


1.what is the vesition managment.

1686


Where do we need Operator overloading?

655


Write a program to show polymorphism.

701


Hey this is venkatesh.Please can any body tell me what is SFLNXTCHG?where we use this keyword?what perpuse we use this?Can you tell me in real time senario with example? And in 7 specification(RPG/400)what is the mandatory specification using programs?

1528