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
please any one pass file aid,xpeditor and endeavor tools
where is available in this mantis toturials?
Write a shell program where you enter a number which corresponds to K.M. Find out the corresponding values in m, cm, inches, and feet. Hints:- 1 k.m= 1000 m 1 m= 100 cm 1 inches= 2.54 cm. 1 feet= 12 inches
how do i create my own exception class which will restrict IO exception?
What is the entry point function of a DLL?
what is the filters in biztakk server? where it can use?
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
Given a set. Write the pseudo code to get all the subsets for the given set. Eg. Input : {1,2} Output : (),(1),(2),(1,2)
What is the Difference between in memory database and physical database
Hi all... I had completed MSC(Computer) and had join the construction company based on sap.they want me to work on abap.but software company is totally different from construction company and they want me 2 grasp it as fast i can.i am finding it difficult.what should i do??????
how does database connection using ADO.NET?
What is the meaning of client-server application. The purpose of Client-Server Application. with description.
I am taking the bmc control m/enterprise manager 7.0 scheduling test and just wanted to see what kind of questions they would ask or if anyone has taken the test and how long it is for how many questions?
what is the software to run the GSM gate opener program
why not instantiating servet using new operator?