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
What is overriding in oops?
What is polymorphism oop?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
What is destructor oops?
What is constructor overloading in oop?
What are benefits of oop?
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.
What does it mean when someone says I oop?
Can we create object of interface?
What is the difference between procedural programming and oops?
What is abstract class in oops?
Get me a number puzzle game-program
Which is not an object oriented programming language?
What is encapsulation process?
What is overloading and its types?