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 reinterpret cast is considered dangerous?
what is single inheritance?
Which is the best institute in hyderabad for C/C++ and it also has fast track course structure.
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
What is friend function?
Can you explain polymorphism?
what is ltti
We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?
How to Increment the value of the empid E001 for each and every employee by using the programe?
Explain the concept of abstracion and encapsulation with one example. What is the difference between them?
What are the data types in oop?
what is the use of classes in c++;