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

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

1470


Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe

1469


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

1653


How to connect to ms word wit VB ojective is to prepare s/w to generate question paper , selects questions randomly from the ms access , database

2015


Which language they use during interview?

1521






10.Define filters,binary to hexadecimal,hexadecimal to decimal?

1520


how sap is different from other software ?

1663


How to get the index of the clicked field in reports in ABAP?

1161


what is meaning of MDM in sap?let me know that meaning

1685


Given an array all of whose elements are positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 2 7 10 should return 13 (sum of 3 and 10) or 3 2 5 10 7 should return 15 (sum of 3, 5 and 7)

763


What is ur porject Architecture? If anyone ask what i have to specify here..

1491


I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??

1663


Where do we need Operator overloading?

655


What is %Type,%Rowtype?

1842


In project we have Documentation phase also,in that what is micro and macro designing?

1426