I have no ideas about the details of the functions in the main function layout in memory ,i only know tha t they are in the temp stack and I want to know some thing detail,please?
for instance:
#include <stdio.h>
int foo()
{ int array[3];
int i;
for(i=0;i<=3;i++)
array[i]-=3;
return 1;
}
int main()
{
foo();
return 0;
}
of course ,we know that the i have exceed the boundary of the array,and it sometime pointer to the call of the function foo(),so please explain the details ?