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 / gouttam pradhan

#include<stdio.h>
main()
{
int a,b;
printf("enter two numbers");
scanf("%d%d",&a&b);
a=a+b;
b=a-b;
a=a-b;
printf("swaped valuess= ",);
printf("a=%d",a);
printf("b=%d",b);
getch();
}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the easiest sorting method to use?

1097


What is the use of bit field?

1116


How to write a multi-statement macro?

989


Can an array be an Ivalue?

1055


What is getch() function?

1009


Why isn't any of this standardized in c? Any real program has to do some of these things.

1148


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1085


Why c is a procedural language?

1010


What is the difference between Printf(..) and sprint(...) ?

1426


What are the data types present in c?

1091


Why do we use namespace feature?

1008


What is a structure member in c?

956


Explain how do you determine the length of a string value that was stored in a variable?

1093


What is use of null pointer in c?

959


Write a program to find factorial of a number using recursive function.

1065