?
Consider the following code snippet :
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()
Answer & Solution
Correct Answer:
Option
A
The state stored in d is 1 because d was not reset.
Join the Discussion
Login to post a comment or share your explanation.
Login