how to use swap function in c++ code example
Example 1: what did swap method return in c++
Return Value: The function does not return anything, it swaps the values of the two variables
Example 2: c++ swap function
int main()
{
int a = 5;
int b = 10;
swap(a, b);
cout << "a = " << a << endl;
cout << "b = " << b << endl;
}