Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to swap two integers 1 and 32767 without using third
variable

Answer Posted / jonu

a=1;
b=32767;

a=(a+b)-(b=a);

printf("%d %d",a,b);

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does selection sort work in c?

1000


What are header files in c?

1045


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

1998


How can I recover the file name given an open stream?

976


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1029


Write a program for finding factorial of a number.

1046


What is #line?

1021


Should a function contain a return statement if it does not return a value?

1042


Why can’t we compare structures?

1242


Differentiate between the expression “++a” and “a++”?

1218


Can we declare variables anywhere in c?

967


Explain union.

1132


What are near, far and huge pointers?

1027


Do you know the difference between exit() and _exit() function in c?

1032


What is memory leak in c?

1084