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 values between two variables without using a
third variable?

Answer Posted / sushma rani

Here we have two variable A=4, B=3

we need to swap values without taking any third variable
result should be A=3, B=4

for that we can do ,
A=A+B-A (e.g. A=4+3-4 => 3)
and
B=B+A-B (e.g. B=3+4-3 => 4)

That's it....

Thanks & Regards
Sushma Rani
Bangalore
===========

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

2093


what is apt_dump_score in datastage where it is useful

1910


How to call a C++ function which is compiled with C++ compiler in C code?

1255


what will we require to build project with the help of oracle

1790


1) How can u create the table?

1814


What are events in smartforms?

2226


what is the main usage of an abstract keyword?please follow the program class A { void display() { System.out.println("hai"); } void print() { } } class B extends A { void print() { System.out.println("Hello"); } } In this program i was gives the implementation of print() according to my requirements in subclass.And there is no definition in superclass then why we can use abstract keyword before a method that i want to gives definition in other classes,is any mistakes in the above usage of method?

1926


what is adodb??y it is used for connection of V.B and access??what is ado?dao?

2138


When we have two versions of the dot net installed how does the compiler know which version of DLL it has to select to an application.

1863


what are importance in problem tracking

2054


Write a pseudo code to evaluate a number to any base given (2...16) based on the input. Number greater than 9 should be given as A-F for 10-15.

2436


Why did you ever become involved in QA/testing?

1990


what do u mean by tagging

2014


I have try to write a record in a TDQ from a fle.... what are the steps to do... can anybody plz come with a solution

2621


Explain polymorphism. Provide an example.

965