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 will be the output for the following main() { printf("hi" "hello"); }

11029


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2646


Is return a keyword in c?

1099


What is the newline escape sequence?

1084


In C programming, what command or code can be used to determine if a number of odd or even?

1072


What header files do I need in order to define the standard library functions I use?

1070


What is pointer & why it is used?

1131


to find the closest pair

2330


What was noalias and what ever happened to it?

1052


In C language, a variable name cannot contain?

1288


What is the use of volatile?

1103


Is there a way to jump out of a function or functions?

1114


What does c value mean?

1207


What is void c?

1112


how we can make 3d venturing graphics on outer interface

4843