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 / yash paranjape

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

Is This Answer Correct ?    82 Yes 189 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why C language is a procedural language?

974


What is a program?

1181


Write the test cases for checking a variable having value in range -10.0 to +10.0?

2266


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1965


write a program for the normal snake games find in most of the mobiles.

2211


What are the applications of c language?

1009


Write a program to generate random numbers in c?

1040


What is the role of this pointer?

988


What are data types in c language?

1005


How can you draw circles in C?

1096


C language questions for civil engineering

1652


Explain how do you determine the length of a string value that was stored in a variable?

1089


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1710


What is the difference between struct and union in C?

1238


Write a program to swap two numbers without using a temporary variable?

1068