InterviewSolution
Saved Bookmarks
| 1. |
Which among the following is true for data members?(a) Private data members can be initialized with declaration in class(b) Static members are initialized in constructors(c) Protected data members can be initialized in class directly(d) Static data members are defined outside class, not in constructorThis question was posed to me in an interview for job.My doubt stems from Data Members topic in division Class Members & Types of Object Oriented Programming |
|
Answer» The CORRECT choice is (d) Static data MEMBERS are DEFINED outside class, not in constructor |
|