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 / vinay tiwari

void main()
{
int a,b;
printf("enter two no ");
scanf("%d%d",&a,&b);
printf("a=%d and b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("a=%d and b=%d",a,b);
getch();
}

Is This Answer Correct ?    22 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does #define work?

1088


Differentiate between new and malloc(), delete and free() ?

1197


What is malloc calloc and realloc in c?

1352


what is the structure pointer?

2136


What are the benefits of organizational structure?

1031


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

1113


What is a pointer variable in c language?

1119


Explain the difference between malloc() and calloc() in c?

1059


Is swift based on c?

1113


What are pointers really good for, anyway?

1075


What is enumerated data type in c?

1090


Why can arithmetic operations not be performed on void pointers?

1061


What is %g in c?

1087


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

1213


What are the 4 data types?

1030