Swapping of two numbers with third variable in c
There are many methods for swapping two numbers but this is the simplest method for swap the number with the third variable. Beginners can understand this tutorial very easily. We are creating simple Swapping of two numbers with a third variable.
swapping of two numbers with using third variable in c
Explanation of Program :
In this program, three variables are created here x,y and z. The value initialized into only two variables x & y.
We can understand by given below pattern.
x=10 and target is x=20
z = x x value copy into z is 10
x = y y value copy into x is 20
y = z z value copy into y is 10
© 2017 - All Rights Reserved