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 / susmita dutta chowdhury

b=(a+b)-(a=b);
printf("%d %d ",a,b);
explanation:-
b=(1+32767)-(a=32767)
b=32768-32767
b=1
a=32767

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you return multiple values from a function?

1116


What is this infamous null pointer, anyway?

1048


write a program to find out prime number using sieve case?

2095


Explain what is the difference between functions getch() and getche()?

1049


What is the use of extern in c?

1092


What is the modulus operator?

1208


Are enumerations really portable?

1025


What is the difference between variable declaration and variable definition in c?

1058


I need previous papers of CSC.......plz help out by posting them.......

2286


Is array a primitive data type in c?

1055


Why isnt there a numbered, multi-level break statement to break out

1044


Differentiate between #include<...> and #include '...'

1050


How do I read the arrow keys? What about function keys?

1082


What is string length in c?

1079


Explain the difference between getch() and getche() in c?

994