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

write a program to swap Two numbers without using temp variable.

Answer Posted / ashish omar

Suppose: a = 3
b=2;

11
10
a = a ^ b;

11
10
==
01

b = a ^ b;
01
10
==
11

a = a ^ b;

01
11
==
10

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is a void pointer used?

1252


When is a null pointer used?

1130


What is 1f in c?

2674


what will be the output for the following main() { printf("hi" "hello"); }

11033


Are pointers really faster than arrays?

1044


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2758


What is a example of a variable?

1037


Is c compiled or interpreted?

1209


What are the types of type qualifiers in c?

1099


What is the difference between formatted&unformatted i/o functions?

1066


What is the role of && operator in a program code?

1085


What does s c mean on snapchat?

1126


Tell me is null always defined as 0(zero)?

1104


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1182


What tq means in chat?

1134