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
What does sksksk mean in text slang?
What is polymorphism in oop example?
What is abstract class in oop?
What do you mean by overloading?
What is oops in simple words?
• What are the desirable attributes for memory managment?
What is advantage of inheritance?
What is the difference between procedural programming and oops?
What is abstraction in oops?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What is polymorphism used for?
Why do we use class in oops?
What is polymorphism oop?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }