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

swapping of two numbers without using third variable using
AND and OR operators

Answer Posted / ramesh reddy

a = a^b; b =a^b; a =a^b;
or
a=a+b; b=a-b; a=a-b;

Is This Answer Correct ?    43 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the syntax and purpose of a switch statement in C.

1073


what type of questions arrive in interview over c programming?

2003


What is typedef?

1365


how to find anagram without using string functions using only loops in c programming

3163


The file stdio.h, what does it contain?

1138


Is it possible to use curly brackets ({}) to enclose single line code in c program?

1287


Who is the founder of c language?

1139


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1073


Why is not a pointer null after calling free?

993


What is c definition?

1227


What is the deal on sprintf_s return value?

1091


What is a lookup table in c?

1083


What is array in c with example?

1202


What is the benefit of using const for declaring constants?

1014


What is #line?

1029