How to swap values between two variables without using a
third variable?
Answer Posted / siva
You can also do it with the exclusive or bitwise operator...
a = a ^ b;
b = a ^ b; ((a ^ b) ^ b == a)
a = a ^ b; ((a ^ b) ^ a == b)
Is This Answer Correct ? | 27 Yes | 8 No |
Post New Answer View All Answers
what is the main usage of an abstract keyword?please follow the program class A { void display() { System.out.println("hai"); } void print() { } } class B extends A { void print() { System.out.println("Hello"); } } In this program i was gives the implementation of print() according to my requirements in subclass.And there is no definition in superclass then why we can use abstract keyword before a method that i want to gives definition in other classes,is any mistakes in the above usage of method?
write a query that returns one row for each department and the number of employees in that department. Given two tables EMPLOYEE and DEPARTMENT, where there can be multiple employees per department.
can any one suggestion me present which course(except java,.net) has huge demand in the market?
Is buffer size and file block size is similar? If similar,at which case it will be same size?
3 members in a pf.how we read 3 members without using ovrdbf.using rg pgms....
what do u mean by tagging
what is c sharp dotnet
Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance
Which method protects back button to retrieve old value from previous page in Struts.
how to convert infix expression to prefix expression?
pleasew define carrier scope in abap (sap).
why we use abstract word in abstract window toolkit in java language.
what is class module in vb6? what it's use? with example..
differences between qtp10.0 and 11.0 ?
Tag for turning an image into a hyperlink is