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 / jonu

a=1;
b=32767;

a=(a+b)-(b=a);

printf("%d %d",a,b);

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The file stdio.h, what does it contain?

1118


write a program fibonacci series and palindrome program in c

980


When should the register modifier be used? Does it really help?

925


How to delete a node from linked list w/o using collectons?

2725


Are global variables static in c?

1112


Why is c platform dependent?

1027


What is multidimensional arrays

1070


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1051


Can you write the algorithm for Queue?

2032


What is the difference between malloc() and calloc() function in c language?

1032


What is a macro, and explain how do you use it?

1021


What language is windows 1.0 written?

992


What is the difference between #include and #include 'file' ?

1004


Explain how can I convert a string to a number?

1029


A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers

1121