This question was asked to me in an interview:
What is a static constructor?
Does it exist in C++? If yes, please explain it wit
In C++, there is no static constructor. In C# (and probably in Java too), you can define static constructor which is called automatically by the runtime so as to initialize static members.
For further question and interest you can read this topic:
What is the rationale for not having static constructor in C++?