Question:You need to keep an eye on the existing number of objects of a given class without introducing a non-class varibale. which of the following makes this happen? 

A Add a member varibale that gets incremented in the default constructer and decremented the destructer. 

B Add a local variable that gets incremented in each constructer and decremented in the desructer 

C Add a static member variable that gets incremented in each constructer and decreented in the destructor 

D This cannot be accomplished since the creation of objects is being done dynamically via “new” 

+ Answer
+ Report
Total Preview: 989

Copyright © 2024. Powered by Intellect Software Ltd