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 interchange two variables without using
the third variable?

Answer Posted / guest

#include<stdio.h>
void main()
{
int x,y;
printf("enter x and y");
scanf("%d%d",&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf("elements after swapping :%d,%d",x,y);
}

Is This Answer Correct ?    185 Yes 32 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is quick sort in c?

1093


What is selection sort in c?

1103


what are bit fields in c?

1722


What is the use of getchar() function?

1135


What oops means?

1001


Explain how many levels deep can include files be nested?

1077


What is malloc() function?

1165


Why array is used in c?

1016


What is main () in c?

1076


How many identifiers are there in c?

1024


Calculate 1*2*3*____*n using recursive function??

2042


How is null defined in c?

1156


What is string in c language?

1161


When should we use pointers in a c program?

1138


can anyone suggest some site name..where i can get some good data structure puzzles???

2085