English, asked by bodireddyvenkatreddy, 3 months ago

Translate
Which of the following statement is correct?
O A constructor is called at the time of declaration of an object
O A constructor is called at the time of use of an object.
ооо
O A constructor is called at the time of declaration of a class .
O A constructor is called at the time of use of a class​

Answers

Answered by soniyayadav88840
4

Answer:

second statement is right

Explanation:

I I hope my answer is help you

Answered by Jaswindar9199
0

QUESTION:-

Which of the following statement is correct?

  • O A constructor is called at the time of declaration of an object
  • O A constructor is called at the time of use of an object.
  • O A constructor is called at the time of declaration of a class .
  • O A constructor is called at the time of use of a class

ANSWER:-

  • A constructor is called at the time of declaration of an object is the correct statement

EXPLANATION:-

  • When an object is created, a specific type of member function called a constructor is immediately invoked. Constructors should be in the public section of the class as they are invoked automatically when the objects are declared. You can also comprehend a constructor with its declaration inside the class body.

  • A constructor in C++ is a unique ‘MEMBER FUNCTION’ which has the same name as that of its class which is wielded to commence some reasonable values to the data members of an object. It is enforced automatically whenever an object of a class is declared.

Hence, A constructor is called at the time of declaration of an object.

#SPJ2

Similar questions