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 / kabita shah

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x,y;
printf("enter two value");
scanf("%d%d",&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf("value of x=%d",x);
printf("value of y=%d",y);
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c language used for?

947


What are the disadvantages of external storage class?

1021


What is variable and explain rules to declare variable in c?

1038


Is c is a middle level language?

1030


a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list

975


Why is sprintf unsafe?

1014


int far *near * p; means

3516


What is calloc in c?

1095


which type of aspect you want from the student.

2131


Give me the code of in-order recursive and non-recursive.

1335


What’s the special use of UNIONS?

1121


What are the features of c language?

1034


What is the difference between int main and void main?

1017


What is the difference between formatted&unformatted i/o functions?

1024


Explain pointers in c programming?

1083