GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS

 Print  |  
Question:  What is global constructor?



November 11, 2007 08:00:03 #1
 kamal7725   Member Since: November 2007    Total Comments: 14 

RE: What is global constructor?
 
Global constructors and destructors in C++ have to be handled very carefully to meet the language specification. Constructors have to be called before the main function. Destructors have to be executed after it returns.
The answer of this question is static variables.
     

 

Back To Question