C Programming20795 marksArithmetic operator
How do you swap the values of two integers without using the third temporary variable? Justify with the example.
How do you swap the values of two integers without using the third temporary variable? Justify with the example. [5]
Normally, swapping two variables requires a third temporary variable. However, we can swap two integers without a temporary variable using either: 1. Arithmetic operators (Addition and Subtraction) 2. Bitwise XOR operator --- Step Operation a b ----------------------- Initial -- 10 20 Step 1 a = ...