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

void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}

in this code always gives the same result for all case

Answer Posted / prateek

Actually this code is for interchanging values of two
variables without using third variable

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is that possible to store 32768 in an int data type variable?

1033


Explain the difference between the local variable and global variable in c?

1024


Explain what is the difference between functions abs() and fabs()?

1098


When the macros gets expanded?

1338


When a c file is executed there are many files that are automatically opened what are they files?

1036


What are extern variables in c?

949


Who is the founder of c language?

1108


Array is an lvalue or not?

1066


Explain what is operator promotion?

1024


What is function prototype in c with example?

1002


What are the __date__ and __time__ preprocessor commands?

1039


what is the difference between class and unio?

2305


Explain what are bus errors, memory faults, and core dumps?

1222


How is a macro different from a function?

1117


Can a pointer be volatile in c?

930