Ask Question
17 March, 09:42

C+ + programming true or false questions

1. We have a class called animalType. Answer the following questions about clas animalType.

a. Its constructors will be named animalType. (True or False)

b. Return type of its constructors will be void. (True or False)

+4
Answers (1)
  1. 17 March, 13:38
    0
    a. True

    b. False

    Explanation:

    Constructor is used to initialize the object of the class.

    Rules of constructor:

    1. Constructor name must same as the class name. it means, if the class name is animalType, then constructor name must be animalType.

    2. Constructor does not have any return type. it means, it does not return anythings.

    Therefore, part (a) is true, Constructor name must same as the class name.

    and part (b) is false, because constructor does not have any return type.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “C+ + programming true or false questions 1. We have a class called animalType. Answer the following questions about clas animalType. a. Its ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers