How to swap values between two variables without using a
third variable?
Answer Posted / sushma rani
Here we have two variable A=4, B=3
we need to swap values without taking any third variable
result should be A=3, B=4
for that we can do ,
A=A+B-A (e.g. A=4+3-4 => 3)
and
B=B+A-B (e.g. B=3+4-3 => 4)
That's it....
Thanks & Regards
Sushma Rani
Bangalore
===========
| Is This Answer Correct ? | 3 Yes | 7 No |
Post New Answer View All Answers
how do we provide security for web services
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.
how can i create report in abap to insert data in table pa0002 using insert command
what is class module in vb6? what it's use? with example..
what are resources in case of Threads
Difference between delegates and Events?
what is web configuration file
WS-NUM PIC S9(05)V(02) SIGN TRAILING SEPARATE MOVE '0050000+' TO WS-NUM The value stored is 00500,00+ MOVE '0050000-' TO WS-NUM Then what is the value will be stored in WS-NUM? Am getting '-00500,00'.....>>> What should I declare to WS-NUM so that I can get correct values for both + & - signs.
I HAVE DONE TESTING TOOLS COURSE,NOW I AM FRESHER,I AM NOT GETTING ANY CALLS,I WANT TO DO THE PROJECT ,WHERE I HAVE TO MEET TO DO THE PROJECT,I AM GOING WITH FAKE EXPERIENCE,SO WHAT I HAVE TO DO.
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
What is abstract Method i want the exact definition and is there any possibility to declare class as abstract without any abstract methods in that class?If it is possible then tell me why and how?
what is technical system, business system, logical system in sap pi7.0
how CLR identify vb file?
can we extend a class having only one parameterised constructor.Suggest the process to do it.
What is the Difference between in memory database and physical database