Q. Consider the following code snippet :
var c = counter(), d = counter();
c.count()
d.count()
c.reset()
c.count()
d.count()
The state stored in d is :
var c = counter(), d = counter();
c.count()
d.count()
c.reset()
c.count()
d.count()
The state stored in d is :
β
Correct Answer: (A)
1
Explanation: The state stored in d is 1 because d was not reset.