how to swap all the values without using temporary variable.
tha values r a = 20, x=60 and p=2.

Answer Posted / learning

x=x-a;
a=x+a;
x=a-x;

x=x-p;
p=x+p;
x=p-x;

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a shell program to test whether a given year is leap year or not ?

2256


What is the use of sas software? Is sas and sap are different?

1011


can we allocate memory for interface? if no then why?

1468


Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;

990


Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".

1953






How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?

1538


Suppose we are doing 4 operations on database using service, first operation is successful but due to some reason remaining 3 operations are failed. I) is this transaction successful or not? ii) How can you give that error message to user?

1507


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??????

1402


how to fin top two miximum values in sql? not 2nd both max value of 1st and 2nd both have to find out

1488


diffrence between oracle apps , .NET , SAP

1603


What is the meaning of client-server application. The purpose of Client-Server Application. with description.

1651


Code for display the images from drive using vb 6.0?

4285


Difference between delegates and Events?

1712


What is %Type,%Rowtype?

1838


What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?

1626