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

Explain how are portions of a program disabled in demo versions?

1125


What is pre-emptive data structure and explain it with example?

3743


What is c language & why it is used?

1122


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

1098


Do array subscripts always start with zero?

1314


What is the difference between test design and test case design?

2101


What is 2 d array in c?

1031


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2109


What is local and global variable in c?

1212


Where local variables are stored in c?

1013


Explain about the constants which help in debugging?

1382


What is #error and use of it?

1287


Explain how to reverse singly link list.

1154


What is selection sort in c?

1111


Hai what is the different types of versions and their differences

1945