A code segment will be used to swap the values of the variables a and b using the temporary variable temp. Which of the following code segments correctly swaps the values of a and b?
a) a to b, temp to a, b to temp
b) temp to a, a to b, b to temp
c) temp to a, a to temp, a to b
d) temp to a, b to temp, a to b