Difference between Constructors and static constructors?

Answer Posted / ganagdhara c

the normal constructor is use to initialize the data elements of the objects which are either static are non static elements where as thee static constructors are use to initialize the static data elements in the class these static data elements are shared by all the objects of the class type these are created when the first object of the class type was created.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of data hiding?

601


What is the difference between strcpy() and strncpy()?

614


What's the hardest coding language?

579


Is java made in c++?

587


Do you know about latest advancements in C++ ?

662






Describe the advantage of an external iterator.

621


What are static member functions?

622


Which bitwise operator is used to check whether a particular bit is on or off?

594


What is a float in c++?

544


Write about the members that a derived class can add?

572


Explain the different access specifiers for the class member in c++.

550


Which format specifier is used for printing a pointer value?

584


How const int *ourpointer differs from int const *ourpointer?

612


what are the iterator and generic algorithms.

1485


What are friend classes? What are advantages of using friend classes?

613