logo
logo
Sign in

Cpp Swap with Examples

avatar
nishadnetha
Cpp Swap with Examples

In this programming example, we will swap two numbers in C++ using call by reference and call by address. in this cpp swap using  Numbers Call by Reference. The swap () function is used to swap two numbers. 

  C++ Program to swap two numbers without third variable We can swap two numbers without using third variable.Exchanges the values of two strings Exchanges the values of string objects x and y, such that after the call to this function, the value of x is the one which was on y before the call, and the value of y is that of x.

collect
0
avatar
nishadnetha
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more