Original Post
This feels like a really dumb question, but I'm not sure what the answer is and its been bugging me a while now. Lets say you have a data structure, which is pre-initialized, just used to hold a collection of read-only data (simple example):
char *prefixes[] = {
"Log",
"Init",
"Renderer",
"Net",
...etc...
};
Now, if I made this a global structure, I know that it would just be stored in the executable as data. Always available. But what if this structure was contained within a function, so it was just local data? Would it still be stored as data, or would the entire structure be constructed from scratch every time the function was called? Is the only alternative in this case to define it static?