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 exchange two variaables without temp

Answer Posted / sujith

another quick way is,

void main()
{
int a = 10, b = 5;
a ^= b ^= a ^= b;
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Dynamic memory allocation in C? Name the dynamic allocation functions.

1412


When do we get logical errors?

1123


When can you use a pointer with a function?

1066


What is wrong with this declaration?

1105


What are the different types of pointers used in c language?

1044


How can I direct output to the printer?

1319


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3714


What is stack in c?

1077


What is the modulus operator?

1208


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

2465


What is the difference between memcpy and memmove?

1016


Can you return null in c?

1161


What is #line?

1051


What are void pointers in c?

995


Explain function?

1087