Ask Question
28 February, 09:30

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)

+2
Answers (1)
  1. 28 February, 09:44
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers