In C code, variables can be declared in a couple of ways. They might be static, so they are allocated a specific address in memory; this is the case for variables defined outside of functions or inside a function and qualified with the keyword static. Alternatively, a variable might be automatic, which means that it is allocated space on the stack or in a register for the duration of its scope [or, more precisely, its lifetime]. Another possibility is to dynamically allocate memory using the standard library functions … (more…)
Embedded Software