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

my answer is very correct compared to the others.(1 to 3)

in answer 1 pinky declared a variable(ia) that is never
used in the program and used a variable(a) that is not
declared.finally pinky did not close main function i.e }

in answer 2 Banti Sharma has written the logic of the
program like a program, but he did not wrote the actual
program,if it is a program then the output is nothing,
because there is no statement present for displaying the
values of a and b


in answer 3 Mona also written the logic of the program like
Banti Sharma but Mona wrote it in a method.and mona never
called that method and from where mona is passing values to
var1 and var2.and mona did not displayed the result.

but in answer 4, that means in my answer,

i did not write the entire program,i just explained the
logic how u can swap without the third variable.

i have taken two variables and assigned sample values
(x=10,y=20) to them and explained each and every line with
that sample values, such that the person who asked this
question can write a program of his own.

Banti Sharma, i think u are not trying to answer the
questions but u are trying to point out the silly mistakes
in answers posted by others.

Is This Answer Correct ?    10 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to print No.of.rows affected after updation using ADO.Net

2839


19. Given a system that is described with the following equation, X=A+(B.(A̅+C)+C)+A.B.(D̅+E̅) a) Simplify the equation using Boolean Algebra. b) Implement the original and then the simplified equation with a digital circuit. c) Implement the original and then the simplified equation in ladder logic.

1633


how many types of bytes are there???

2509


What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?

2227


how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there

2169


what is diff bet ref variable & instance of class

1950


In project we have Documentation phase also,in that what is micro and macro designing?

1817


How to create a new dataset only duplicate observations in proc sort procedure?

1973


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

2051


can any method return type may be constructor , or that method name allow

2037


hai i am mca 2009 fresher.please tell me which certification helps me to get an IT job faster which institute is good in hyderabad.please mail me to prasanna.1856@rediff.com

1922


Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.

997


Q2. A memory location has physical address D5687h. Compute: a. The offset address if the segment number is D445h. b. The segment number if the offset address is B577h.

2061


why we need to take u?

2080


what is the use MDM(Master Data Management)and meaning

2376