OK I'm at a point in my book that doesn't explain storage duration for variables. Correct me if I am wrong but this is what I think it means.
First off there is automatic variables. They are within scope and are only for the duration of that scope. (i.e curly brackets). They can be changed in a different scope and hold that value in that scope only and return when it closes.
Then there is global scope which I'm thinking is for the entire program. There are 2 different storage durations in that which are static and dynamic.
That is what I am getting. So can anyone explain in further detail about global scopes and their duration for variables. And also is what I get from that correct?