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 |
What is property in oops?
IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?
what are three tenets of object orinted Systems?Why they call like that ? Please answer me. Advance thanks.
How can we use the preprocessor #if and #elseif.
Can static class have constructor?
Why do while loop is used?
WAP find square root of any number (without using sqrt() )?
What is sub classing in c++?
What is encapsulation process?
#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; wow *b; a.x = 22; b = &a; a.x = 23; cout << b->x; return 0; }
what is the advantage in software? what is the difference between the software developer and Engineer
What polymorphism means?