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...

write a program to swap Two numbers without using temp variable.

Answer Posted / george washington

Suppose:
x=1
y=3

Redefine:
x=x+y; //Or, x=1+3=4 and
y=x-y; // y=4-3=1 and
x=x-y; // x=4-1=3

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code on reverse string and its complexity.

1009


What standard functions are available to manipulate strings?

1111


What are unions in c?

1007


Why shouldn’t I start variable names with underscores?

1032


Why do we use namespace feature?

1024


Is boolean a datatype in c?

1038


Is array name a pointer?

1014


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1111


Write a program to generate random numbers in c?

1070


What is keyword in c?

988


Why ca not I do something like this?

995


Write a factorial program using C.

1045


What is hashing in c?

1132


List the difference between a "copy constructor" and a "assignment operator"?

984


How can I manipulate strings of multibyte characters?

1094