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 / ravi saini

void main()
{
int a,b;
printf("enter the two numbers");
scanf("%d%d",&a,&b);
a^=b^=a^=b;
printf("%d%d",a,b);//swapped no
}

Is This Answer Correct ?    119 Yes 66 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the error message "DGROUP exceeds 64K" mean?

1166


Compare array data type to pointer data type

965


What is "Duff's Device"?

1109


What is realloc in c?

1014


Explain why c is faster than c++?

998


Is array name a pointer?

993


What does != Mean in c?

986


Is c++ based on c?

1020


How to establish connection with oracle database software from c language?

2141


write a program to rearrange the array such way that all even elements should come first and next come odd

2219


c language interview questions & answer

1895


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

1199


Is file a keyword in c?

883


What is extern storage class in c?

939


What is "Hungarian Notation"?

1027