Question: int a-0; // Global accessible anywhere in file. void test (int b) Parameter static int c-0 int d=0; //Static - retains its value over successive

 int a-0; // Global accessible anywhere in file. void test (intb) Parameter static int c-0 int d=0; //Static - retains its value

int a-0; // Global accessible anywhere in file. void test (int b) Parameter static int c-0 int d=0; //Static - retains its value over successive function calls //Loca if(b>_ 0) { int e; 7Local inside block Cat top of block) ANSI C99 only e a b+c+ d; // a,b,c,d are accessible anywhere in test // e is accessible only after this declaration inside the if-block. printf ("e %d ", e); printf (" c %d n", c); int main (O) //"a" is accessible in all functions in the file. test (1); test (2); Exercise 2.9: Hand-execute the code above and predict what gets printed out in your README. Do you think static variables are stored on the stack? Why or why not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!