how to swap the variables without using temp and operators
Answer / 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 |
Why is encapsulation used?
4. What do you mean by a prototype? Define analysis prototype
What is the difference between class and structure?
What is destructor give example?
In OverLoading concept,Why they are not consider return value and why they are consider only parameters in method? For ex: public int Add(int a,int b){...} public String Add(int a,int b){...}
what is a ststic variable and stiticfunction briefly explain with exmple and in which case we use
wht is ditch
how can we design a magic square in c++?or suggest me the basic idea of it.
what is difference between String s=new String("vali"); String s="vali"
What is abstraction in oops with example?
WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP
What is abstraction encapsulation?