Automatic variables and variables scoping
Internal variables - declared inside a function or a block. These variables are local, or private, to the block in which they are declared and cannot be accessed from the outside. They are usually automatic: they only come into existence when the function or block is entered and are destroyed automatically after exit from the block (function).Static variables - internal variables that are created and initialized at compile time. They retain their value even after exit from the block (function).
Example: A function that keeps track of how many times it is called:static int my_count = 0;my_count++;