Suppose we have the following:
void print() { int a; // declaration a = 9; cout << a << endl; } int main () { print(); } >
This will be compiler dependent, but typically the variable int a will be allocated on the stack at the time the function is called.
int a