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...

can u write a program in C, which does not use = (eqaul)or
any arithmatic assignment(like -=,+=,*= etc) operator to
swap to number?

Answer Posted / musa

swapping x and y using z as intermediary

memcpy(&z, &x, sizeof(x));
memcpy(&x, &y, sizeof(x));
memcpy(&y, &z, sizeof(x));

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of type declarations?

1125


in iso what are the common technological language?

2122


What is maximum size of array in c?

1053


What are the advantages and disadvantages of a heap?

1218


Why does everyone say not to use gets?

1118


how can f be used for both float and double arguments in printf? Are not they different types?

1081


How to draw the flowchart for structure programs?

9349


What is else if ladder?

1032


Linked lists -- can you tell me how to check whether a linked list is circular?

1097


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2275


What is a file descriptor in c?

1145


Is c is a procedural language?

1106


Explain how are 16- and 32-bit numbers stored?

1278


What is scanf_s in c?

1133


Can an array be an Ivalue?

1105