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

Explain the difference between call by value and call by reference in c language?

1076


hi any body pls give me company name interview conduct "c" language only

2256


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1026


What do you mean by Recursion Function?

1089


What is #include stdio h and #include conio h?

1066


What are the advantages of Macro over function?

1959


Write a program to reverse a given number in c language?

1077


Is c easier than java?

1020


What is putchar() function?

1104


How do I use strcmp?

1039


Explain the use of fflush() function?

1040


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1966


If fflush wont work, what can I use to flush input?

1071


Write a program to print factorial of given number using recursion?

978


Can the curly brackets { } be used to enclose a single line of code?

1138