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

Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.

1224


Why c language?

1053


Is malloc memset faster than calloc?

1063


When was c language developed?

1194


Differentiate between calloc and malloc.

1259


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3083


What is a nested formula?

1141


State the difference between x3 and x[3].

1109


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

993


What will the preprocessor do for a program?

1070


In C language, a variable name cannot contain?

1270


What is the correct code to have following output in c using nested for loop?

1076


What is this infamous null pointer, anyway?

1044


What is struct node in c?

1069


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1948