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 / manas ranjan(gift)

#include<stdio.h>
void main()
{
int a,b;
printf("enter the numbers");
scanf("%d%d",&a,&b);
printf("before swaping the values are");
printf("a=%d,b=%d",a,b);
void swap(int,int);
swap(a,b);
}
void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is a null pointer different from a dangling pointer?

1035


What is wrong in this statement?

1148


What is "Duff's Device"?

1171


What is meant by operator precedence?

1154


Here is a neat trick for checking whether two strings are equal

1022


How many types of arrays are there in c?

1049


Explain the use of fflush() function?

1085


Tell me is null always defined as 0(zero)?

1091


What is structure data type in c?

1025


Write a program of advanced Fibonacci series.

1155


Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1240


How do you generate random numbers in C?

1201


What is far pointer in c?

1317


How do I use void main?

1092


What’s a signal? Explain what do I use signals for?

1116