What is Constructor

Answer Posted / m.shanmuga sundaram

Constructor is a default member function available with a
class.

It can be explicitly defined in a class to initialize the
variables.

Constructor is called when an object is created for a class.

Rules for defining a constructor
********************************

The name of the constructor should possess the same name of
the class.

The constructor member function should not return a value.

Is This Answer Correct ?    102 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2066


how can u do connectivity in c++ language? plz send me connectivity code in c++ ?

1995


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

1733


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2594


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

1793






What is a stl vector?

706


How is stl different from c++ standard library?

845


How stl is different from the c++ standard library?

727


What are the symptoms of stl?

697


Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister

1739


What is stl stack?

745


What is the stl, standard template library?

675


help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase

1982


totoo po ba ang manga aliens!

2421


What are the various types of stl containers?

829