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

What is a function in c?

1489


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

990


Can we access the array using a pointer in c language?

1001


Why c language?

1009


How many keywords (reserve words) are in c?

1084


Does c have an equivalent to pascals with statement?

961


How can I convert a number to a string?

1098


What are the functions to open and close the file in c language?

989


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5403


Define macros.

1226


Compare and contrast compilers from interpreters.

1078


What does int main () mean?

961


Explain continue keyword in c

965


Difference between linking and loading?

1065


What are Macros? What are its advantages and disadvantages?

1094