Which of the following code segments can be used to interchange the values of the variables num1 and num2 ?
The figure presents two blocks of code that consist of 2 total lines. Line 1: [begin block] num1 ← num2 [end block] Line 2: [begin block] num2 ← num1 [end block]
Image with alt text: The figure presents two blocks of code that consist of 2 total lines. Line 1: [begin block] num1 ← num2 [end block] Line 2: [begin block] num2 ← num1 [end block],
The figure presents three blocks of code that consist of 3 total lines. Line 1: [begin block] temp ← num1 [end block] Line 2: [begin block] num1 ← temp [end block] Line 3: [begin block] num2 ← num1 [end block]
Image with alt text: The figure presents three blocks of code that consist of 3 total lines. Line 1: [begin block] temp ← num1 [end block] Line 2: [begin block] num1 ← temp [end block] Line 3: [begin block] num2 ← num1 [end block],
The figure presents three blocks of code that consist of 3 total lines. Line 1: [begin block] temp ← num1 [end block] Line 2: [begin block] num2 ← num1 [end block] Line 3: [begin block] num1 ← temp [end block]
Image with alt text: The figure presents three blocks of code that consist of 3 total lines. Line 1: [begin block] temp ← num1 [end block] Line 2: [begin block] num2 ← num1 [end block] Line 3: [begin block] num1 ← temp [end block],