Question:Create a simple code fragment that will swap the values of two variables num1 and num2.
Answer temp = num1; num1 = num2; num2 = temp;
temp = num1; num1 = num2; num2 = temp;
+ Report
Create a simple code fragment that will swap the values of two variables num1 and num2.