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

< No Frames > tag is used for

2830


what is the work of 1tier,2tier,&ntier? Plz Explain it!

2521


SAS question: I have 50 fils a1,a2,...,a50. the primary key is upc. then if i want to merge all 50 files, the code is as follows, data test; merge a1 ... a50; by upc; run; we know that writing all 50 files name is time consuming, is there any standard format of this code?

1998


how CLR identify vb file?

3089


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

2335


could u please also write an example of a code that involves instances from an abstract class just as u did for interfaces because u said it could also work which i really doubt. thanks

2197


why we use abstract in awt?

2078


Write a program to create a process in UNIX

2600


Tips for blog integration by www.esteemwebsolutions.com. Can Any body suggest me to how to make wonderful questions on web integration..

2298


what is the extension of SPDS Dynamic cluster tables?

2208


How can we develop a multi-tier application in Java?

1943


What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

7990


If u need any fake experience certificate in software side, contact me at: vikramyadhav@gmail.com

8382


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

1117


Is class is a abstract datatype in java?

2034