Multiple choice general knowledge Swap the value of two variable in one statement without using any temporary variable a=a+b; b=a-b; a=a-b; c=a+b; b=a-b; c=a-b; c=a-b; b=a+b; c=a-b; a=a+b; b=a-b; c=a-b; Reveal answer Fill a bubble to check yourself A Correct answer Explanation The classic arithmetic swap without a temporary variable uses three statements: a=a+b; b=a-b; a=a-b. This works because after the first line, a holds the sum; then b gets the difference (original a), and finally a gets the difference (original b).