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 all the values without using temporary variable.
tha values r a = 20, x=60 and p=2.

Answer Posted / gurusaran

x=x*a; (x=1200)
a=x/a; (a=60)
x=x/a; (x=20)

p=p*x; (p=40)
x=p/x; (x=2)
p=p/x; (p=20)

Hence final values are a=60,x=2,p=20

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between HTML and DHTML?

2158


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

2090


In OB52 , How to define two open posting period, Like only 5 and 8 posting should be open.. should not open 6 and 7..period..

1438


Find out the list of roles which gives access to GUI activities? thanks in advance

2110


Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)

1152


what is difference between kpo and it industry? that is in terms of work, package etc

1962


HOW TO FIND NUMBER OF TWOS IN N!(N FACTORIAL)??

2250


What is the difference between WebIntelligence and Designer in creating universes?

2028


Given a set. Write the pseudo code to get all the subsets for the given set. Eg. Input : {1,2} Output : (),(1),(2),(1,2)

2658


What are the tasks performed by a Team Lead

2816


5.Call by value and Call by reference with program?

2255


how to display xisheet in list box in c# .net

2062


a characteristic of a multiprogramming is? a.simultaneous exe of pgm instr 4m 2 appli b.concurrent processing of 2 r more prgms c.multiple cpu s d.all the abov

2151


in IT trend mantis meant what? how to know mantis in IT trends? detail description about mantis?

2147


Write a program to swap the content of two variables without using a third variable.

1038