Computer Science, asked by amit7429, 8 months ago

Write an algorithm to enter 2 numbers and after swapping print there value

Answers

Answered by ItsVirat
0

Explanation:

1. Initialize two variables x,y,temp and two pointers *a and *b. 2. Enter the two numbers and store it in the x and y.

...

Let a and b be the two numbers.

In the main program call the swap program by passing the address of the numbers. swap(&b,&b).

Algorithm for swap procedure goes like this.

Similar questions