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

wat are the two methods for swapping two numbers without
using temp variable??

Answer Posted / vijayakumar kanagasabai

main()
{
int a=4;b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("After swapping: a=%d, b=%d",a,b);
}

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the role you expect in software industry?

2154


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

1253


What is identifier in c?

1016


What is the difference between procedural and declarative language?

1151


I have seen function declarations that look like this

1050


What is union and structure in c?

1234


What is realloc in c?

1125


What is the code for 3 questions and answer check in VisualBasic.Net?

2167


Explain how do you declare an array that will hold more than 64kb of data?

1460


What is a structure and why it is used?

1230


What are different types of variables in c?

1083


What are the 4 types of functions?

1061


Why c language?

1083


What is the size of enum in c?

1121


How can you convert integers to binary or hexadecimal?

1039