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

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

2477


what is c sharp dotnet

2282


What r the attributes using in Win Runner?

2424


What is autocall macro and how to create autocall macro? what is the use of it?

2061


Write a program to find whether a given number is prime or not.

1030


there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box. eg: 3 box contain stick as:1,1,1. if u take 1 stick from 3rd numbred box you will any how win the match.

2838


when will triggars the at new event in abap and web dybn pro?

1974


What is WEB 3.0? What are the features their in WEB3.0

2153


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

2280


How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?

1954


what is the difference between rename and label

2376


in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?

2070


public static void main(String args[]) describe it

2117


Which language they use during interview?

1995


Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;

1466