EP 241 Computer Programming |
|
Exchange Function
Following functions swaps two arguments by using a third local variable, z. datatype exchange(datatype &x, datatype &y){ datatype z = x; x = y; y = z; }where datatype can be any fundamental data type in C++ (double, float, int, etc). So, your function must work for all data types. |
|||||||||||||||||||||||||||||||||||||||||||
University of Gaziantep - Department of Engineering Physics (2005 - 2024) |