← PWC questions

Swap two numbers without temporary variable

Filed under PWC · Also reported at Betsol, Western Digital

The question

Write a program to swap two variables without using a third temporary variable.

No write-up yet. Related questions below have one.

Related PWC questions

Collected from public candidate posts and coding forums. Updated Nov 2026.