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

How to swap two values using a single variable ?

condition: Not to use Array and Pointer ?

Answer Posted / aditya

main(){
int a=10,b=20;
printf("%d%d",a,b);
a^=b,b^=a,a^=b;
printf("%d%d",a,b);

}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are keywords in c with examples?

1038


Is anything faster than c?

969


What is the heap?

1155


What is #define?

1039


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2345


What is #line?

1005


What is bubble sort in c?

1001


How arrays can be passed to a user defined function

966


What is the meaning of typedef struct in c?

1004


How can I recover the file name given an open stream?

946


How #define works?

1049


For what purpose null pointer used?

1011


What is the purpose of scanf() and printf() functions?

1173


What is typedef?

1329


provide an example of the Group by clause, when would you use this clause

2128