C++
Programming and Technical
Programming
Technical
Which of the following statements is correct?
Options
1) First time method of a class is called, the constructor method is called.
2) Every time method of a class is called, the constructor method is called.
3) Every time an instance of a class is created, the constructor method is called.
4) None of the above
Read Solution (Total 2)
-
- option 3, as when ever the instance of a class is created we need to initialize it to some value for that we need a constructor....basically constructor is something which makes object....if we won't initialize the object value it will use garbage values and whenever any member function it won't show the appropriate result.
- 9 years agoHelpfull: Yes(0) No(0)
- 3) Every time an instance of a class is created, the constructor method is called.
- 6 years agoHelpfull: Yes(0) No(0)
C++ Other Question