I have the following code:
void foo(void)
{
const int array[100] = ....;
// do stuff with array
}
I mostly use code like this so my program doesnt waste memory because array
only gets allocated when foo is called.
But now I heard from somebody that the following code is the same in terms
of memory footprint:
static int array[100] = .....
void foo(void)
{
// do stuff with array
}
is that true?