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?

Answers were Sorted based on User's Feedback



Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers..

Answer / x

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

Is This Answer Correct ?    3 Yes 1 No

Hi All, I am new to programming and want to know how can i write a code to take input of 2 numbers..

Answer / gopi

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

Is This Answer Correct ?    4 Yes 3 No

Post New Answer

More OOPS Interview Questions

What do you mean by inheritance?

0 Answers   IBS,


how do you handle yourself when you feel the wald is aganist you

2 Answers  


What does oop mean in snapchat?

0 Answers  


c++ is a pure object oriented programming or not?

5 Answers   Wipro,


c++ program to swap the objects of two different classes

0 Answers  


how to write a java program for an output ****0 ***01 **012 *0123 01234

1 Answers  


Definition of Object Oriented Programming in single line?

33 Answers   Impact Systems, Q3 Technologies, TCS,


Why do we use class?

0 Answers  


what is polymorphism?

4 Answers  


What is interface in oop?

0 Answers  


What are two types of polymorphism?

0 Answers  


what is the difference between <stdio.h>and "stdio.h"?

5 Answers  


Categories