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

Why dont c comments nest?

1050


What is a void pointer? When is a void pointer used?

1062


write a program to concatenation the string using switch case?

2107


What is function prototype in c with example?

1087


Can you write the algorithm for Queue?

2118


How many levels deep can include files be nested?

1142


Should I learn data structures in c or python?

1026


What is the use of bitwise operator?

1132


Why can’t constant values be used to define an array’s initial size?

1383


What is volatile variable how do you declare it?

1102


GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

1102


When should volatile modifier be used?

1015


Explain the difference between malloc() and calloc() function?

1056


plz let me know how to become a telecom protocol tester. thank you.

2191


what is the syallabus of computer science students in group- 1?

2321