functional programming – What is the result of the program if the values ​​are passed by value, result and name?

Given program

I just want to make sure that I do it properly. The first part asks what is the output if the values ​​are pasted by result-value and z-address[w] is calculated at the time of the call. I had:

10 10

From my understanding is since z[w] is calculated at the time of the call then z[0] would have gone into the function instead of z[1] (If it was calculated just before the return). So the output would be similar to going through fair value, right?

Also to call by name I had:

20 10

Since it's called by name, the value w will be changed when printing z[w]so he would come out z[1], which is 20. Since the z[0] can not be changed in the function it would produce 10.

Am I doing it correctly?

Thank you.