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

#include<stdio.h>
#include<conio.h>
void swap(int a,int b);
void main()
{
int a,b;
swap(a,b);
printf("Enter the 2 nos");
scanf("%d%d",&a,&b);
}
void swap(int x,int y)
{
x=x*y;
y=x/y;
x=x/y;

}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is variable declaration and definition in c?

860


What does return 1 means in c?

1008


What are the three constants used in c?

932


What are the types of c language?

981


Is c dynamically typed?

1093


Explain what are binary trees?

1023


What is the scope of local variable in c?

1048


How can I find out how much free space is available on disk?

1015


How can I remove the leading spaces from a string?

1099


Explain is it better to bitshift a value than to multiply by 2?

1142


What is void main ()?

1014


Explain how do you list files in a directory?

1019


What is the main difference between calloc () and malloc ()?

1099


What does static variable mean in c?

1063


Explain what does the function toupper() do?

1007