filmov
tv
Swap two numbers using third variable #education #swap #cprogramming
Показать описание
Step 1: You store the value of a in a temporary variable c.
Step 2: You assign the value of b to a.
Step 3: You assign the value stored in c (original value of a) to b.
This way, you successfully swap the values of a and b.
Step 2: You assign the value of b to a.
Step 3: You assign the value stored in c (original value of a) to b.
This way, you successfully swap the values of a and b.