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...

swap two integer variables without using a third temporary
variable?

Answer Posted / onkar koparde

i'll only give u logic #include<stdio.h>
void main() { int a=10,b=20;
printf("b4 swap:a=%d b=%d",a,b);
a=a+b;b=a-b;a=a-b; printf("aftr
swap:a=%d b=%d",a,b); }
from-onkar.koparde@gmail.com

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I send mail from within a c program?

1040


What is the explanation for modular programming?

1222


What does double pointer mean in c?

1195


Is c compiled or interpreted?

1203


How is a structure member accessed?

1145


What is a struct c#?

1061


What is chain pointer in c?

1070


Explain heap and queue.

1100


What does == mean in texting?

1319


Can we initialize extern variable in c?

1145


Explain how do you print an address?

1152


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

2079


What are the 5 elements of structure?

1085


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

3331


What are inbuilt functions in c?

1040