1. Swap value of 2 variable with out using any third variable.
Suppose
You can also swap two equal length array with out using any temporary third variable by looping and traversing the arrays.
Suppose
- a= 5
- b = 7
- a = a + b; = 12;
- b = a - b ; = 5;
- a = a -b; = 7
You can also swap two equal length array with out using any temporary third variable by looping and traversing the arrays.
No comments:
Post a Comment