Computer Science, asked by varshinic333, 3 months ago

swap two numbers using pointers in python​

Answers

Answered by sakshi746454
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 KeshaDesai
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