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 integers 1 and 32767 without using third
variable

Answer Posted / g.sai lakshmi priyanka

void main()
{
 int a,b;
 a=32767,b=1;
 a=a*b;
 b=a/b;
 a=a/b;
 printf("%d %d",a,b);
}
 EXPLAINATION:
 
a=32767*1=32767
b=32767/1=32767
a=32767/32767=1

a=1,b=32767

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of c preprocessor?

1212


What is an auto keyword in c?

1047


Explain is it valid to address one element beyond the end of an array?

1149


what is the role you expect in software industry?

2085


Hai what is the different types of versions and their differences

1901


Can a pointer be volatile in c?

935


What are derived data types in c?

1014


What is difference between union and structure in c?

1073


Can we use any name in place of argv and argc as command line arguments?

1016


Why is c faster?

1018


Explain what is a static function?

1050


What is a far pointer in c?

994


What is meant by high-order and low-order bytes?

1005


what is reason of your company position's in india no. 1.

2237


What are examples of structures?

1029