Solved

Which of the Following Swaps the Values of SomeNums[0] and SomeNums[1]

Question 19

Multiple Choice

Which of the following swaps the values of someNums[0] and someNums[1], which currently contain the values 8 and 3, respectively?


A) someNums[0] = someNums[1]
SomeNums[1] = someNums[0]

B) temp = someNums[0]
SomeNums[0] = someNums[1]

C) temp = someNums[0]
SomeNums[0] = someNums[1]
SomeNums[1] = temp

D) someNums[0] = someNums[1]
SomeNums[1] = someNums[0]
SomeNums[1] = temp

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions