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

Hi All,
I am new to programming and want to know how can i write a
code to take input of 2 numbers from user and swap it
without using a temp variable?

Answer Posted / x

a=a+b;
b=a-b;
a=a-b;

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is overriding in oops?

1079


What is polymorphism oop?

1034


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

2436


What is destructor oops?

1053


What is constructor overloading in oop?

1100


What are benefits of oop?

1100


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

1280


What does it mean when someone says I oop?

1031


Can we create object of interface?

1096


What is the difference between procedural programming and oops?

1095


What is abstract class in oops?

992


Get me a number puzzle game-program

2221


Which is not an object oriented programming language?

955


What is encapsulation process?

1017


What is overloading and its types?

1124