(In many programming languages where the swap function is built-in; in C++, overloads are provided allowing std::swap to swap some large structures in O(1) time.)
After swap() is performed, x will contain the value 0 and y will contain 1; their values have been exchanged. Of course, this operation may be generalized to other types of values, such as strings, aggregated data types and comparison sorts, utilize swaps to change the positions of data.
Using a temporary variable
The simplest and probably most widely used method to swap two variables is to use a third temporary variable:
While this is conceptually simple and in many cases the only convenient way to swap two variables, it uses extra memory. Although this should not be a problem in most applications, the sizes of the values being swapped may be huge (which means the temporary variable may occupy a lot of memory as well), or the swap operation may need to be performed many times, as in sorting algorithms.
A customer may or may not also be a consumer, but the two notions are distinct, even though the terms are commonly confused. A customer purchases goods; a consumer uses them. An ultimate customer may be a consumer as well, but just as equally may have purchased items for someone else to consume. An intermediate customer is not a consumer at all. The situation is somewhat complicated in that ultimate customers of so-called industrial goods and services (who are entities such as government bodies, manufacturers, and educational and medical institutions) either themselves use up the goods and services that they buy, or incorporate them into other finished products, and so are technically consumers, too. However, they are rarely called that, but are rather called industrial customers or business-to-business customers. Similarly, customers who buy services rather than goods are rarely called consumers.
In economics, typically, the term market means the aggregate of possible buyers and sellers of a certain good or service and the transactions between them.
The term "market" is sometimes used for what are more strictly exchanges, organizations that facilitate the trade in financial securities, e.g., a stock exchange or commodity exchange. This may be a physical location (like the NYSE, BSE, NSE) or an electronic system (like NASDAQ). Much trading of stocks takes place on an exchange; still, corporate actions (merger, spinoff) are outside an exchange, while any two companies or people, for whatever reason, may agree to sell stock from the one to the other without using an exchange.
Trading of currencies and bonds is largely on a bilateral basis, although some bonds trade on a stock exchange, and people are building electronic systems for these as well, similar to stock exchanges.
Market is a 2003 film directed by Jay Prakash and starring Manisha Koirala. The film follows the story of Muskaan Bano (Manisha Koirala) from her life in Indian brothels after being sold there by her Arab husband to her attempts at revenge later in life. The film garnered a decent opening and was a surprise success of the year.
It was declared Average at the box office.