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

write a program to swap Two numbers without using temp variable.

Answer Posted / biren

#include<stdio.h>
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain the four storage classes in C?

1128


Do string constants represent numerical values?

1409


What is the correct declaration of main?

1217


Why do we need a structure?

1050


How can I remove the leading spaces from a string?

1172


Why is c called c not d or e?

1103


What do you understand by friend-functions? How are they used?

1213


Describe explain how arrays can be passed to a user defined function

1113


How do you define structure?

1050


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

1000


Why is python slower than c?

1095


What do you mean by invalid pointer arithmetic?

1087


How can I get back to the interactive keyboard if stdin is redirected?

1192


What is function pointer c?

1122


How macro execution is faster than function ?

1204