static storage is decided at compilation time. However, consider the scenario where we have lot of lazy initialization in functions:
void foo ()
{
static int a[1000];
}
I am not discussing the coding practice here, but the technical aspect. As many such other functions like foo() are executed, those many static variables will be introduced on data segment.
Will compiler take the lazy initialization also in the account while allocating space for data segment. If 'No' then, will it cause segmentation fault at runtime while the code is executing ? (more likely to happen when lot of static data inside template methods).
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)