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 / nagarjun

main()
{
int a=4,b=5;
/*b=(a+b)-(a=b);*/
a^=b^=a^=b;
printf(" \n %d %d \n",a,b);
}

Is This Answer Correct ?    21 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define VARIABLE?

1101


Write a program to generate random numbers in c?

1040


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

2211


show how link list can be used to repersent the following polynomial i) 5x+2

2185


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

2274


What is file in c preprocessor?

1084


What is the use of define in c?

998


What is typedef?

1323


Where we use clrscr in c?

1087


Which are low level languages?

1041


5 Write an Algorithm to find the maximum and minimum items in a set of ā€˜n’ element.

2034


What is getch?

1085


Is c weakly typed?

962


What is header file definition?

1023


What is the role of && operator in a program code?

1013