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 / padmas

To swap the values without using temporary variable
for a,x and p,
Do a call to swap function for a and p and
another call to same swap function for x and p.
call1:swap(a,p);
call2:swap(x,p);
swap(variable1,variable2)
{no temporary variable}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1665


Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in

2036


what are the things i had to say in personal introduction in hr round mail me to prasanna.1867@rediff.com

2123


what is class module in vb6? what it's use? with example..

2444


what is woransient key word? how it is used in java

2359


will it allow to add same value in HashMap class.

2136


WHat is execution in manual testing and when will we start execution and what language we use in execution

1956


What is the Difference between in memory database and physical database

2608


what is apt_dump_score in datastage where it is useful

1960


hoe to data grid use in sql server 2000?

2079


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

2279


design a counter with the following repeated binary sequence: 0, 1, 2, 3, 4, 5, 6, 7, 8 using JK Flip Flop.

17805


what is the difference between uservariables and systemvariables (in Environmental variables)???

2437


through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?

2529


what is the diffrence between software and hardware language?

2332