Answer: C
Reason: The "counter()" method used in the above code made increment in the value of the variable by one each time it is called, and the" reset()" function resets the value of that variable to zero. Therefore if we look carefully, we can see that on variable "y" the "counter()" method was called two times, and the "reset()" method was not called even for one time, so the value of the variable y will be 2.