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

Why do we use oop?

601


What is use of overloading?

604


What does and I oop mean?

612


What is the diamond problem in inheritance?

576


Can abstract class have normal methods?

610






What is abstraction encapsulation?

655


Why multiple inheritance is not possible?

596


Do you know about multiple inheritance?

637


How many human genes are polymorphic?

570


How do you use inheritance in unity?

588


Can enum be null?

583


How do you achieve runtime polymorphism?

569


What is the renewal class?

2161


What is the benefit of oop?

568


What is multilevel inheritance in oop?

553