Question: what is the difference between the constructor and a function?
Answer: Constructor vs Member function 1) Constructor doesn't have a return type. Member function has a return type. 2) Constructor is automatically called when we create the object of the class. Member function needs to be called explicitly using object of class.