swap two numbers using pointers in python
Answers
Answered by
5
Answer:
Swapping two numbers using temporary variable
In this program we are using a temporary variable temp to swap the two numbers. We are storing the value of num1 in temp so that when the value of num1 is overwritten by num2 we have the backup of the num1 value, which we later assign to the num2.
Answered by
0
Explanation:
In this program we are using a temporary variable temp to swap the two numbers. We are storing the value of num1 in temp so that when the value of num1 is overwritten by num2 we have the backup of the num1 value, which we later assign to the num2.
Similar questions