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

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

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a function in oop?

627


Whats oop mean?

586


What does it mean when someone says I oop?

580


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6143


What is the significance of classes in oop?

587






write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

1789


What is the advantage of oop over procedural language?

623


What are the important components of cohesion?

550


What is inheritance and how many types of inheritance?

614


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1454


What is oops in programming?

562


What is the highest level of cohesion?

575


What is debug class?what is trace class? What differences are between them? With examples.

1604


Write a program to reverse a string using recursive function?

1788


What is overriding in oops?

598