how to swap the variables without using temp and operators
Answer Posted / santhosh
int a, b;
a = 10;
b = 20;
a = a + b;
//a=30
b = a - b;
a = a - b;
Console.WriteLine("a={0},b={1}", a, b);
Console.ReadLine();
Is This Answer Correct ? | 10 Yes | 2 No |
Post New Answer View All Answers
How do you answer polymorphism?
What are oops functions?
Why is abstraction used?
Why do we use polymorphism?
What is property in oops?
How to call a non virtual function in the derived class by using base class pointer
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
What is interface? When and where is it used?
What is the real time example of inheritance?
Can we override main method?
What are oops methods?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is polymorphism programming?
What is polymorphism in oops?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box