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

where are auto variables stored? What are the characteristics of an auto variable?

1022


What are global variables and how do you declare them?

1018


Explain what is #line used for?

1015


Why & is used in c?

1120


What is the use of a conditional inclusion statement in C?

1012


What is a pointer value and address in c?

1062


What is pointer and structure in c?

1079


Write a program to identify if a given binary tree is balanced or not.

1094


Explain what is the general form of a c program?

1035


What is the collection of communication lines and routers called?

1062


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

1018


What is extern keyword in c?

1086


Describe how arrays can be passed to a user defined function

1227


What is meant by type casting?

1023


The __________ attribute is used to announce variables based on definitions of columns in a table?

1136