Confusion with storage of declared variables and volatile
That's just plain incorrect.

The volatile keyword tells the compiler that the value of that variable may change at any time, and that therefore it must re-read the value every time you use it in your code.

If you don't use volatile, the compiler may choose to make an optimisation.

Consider this code:

int b = 7; 
a = b + b;


The compiler can see that 'b' is always 7 -- it is assigned the value 7 and nobody ever changes it.  The compiler may choose to optimise this to the equivalent of

a = 14;


But if you do this:

volatile int b = 7;
a = b + b;


then the compiler MUST read b twice from memory.

Why would you want to do that?  Perhaps you have an interrupt which might change the value of b.  Perhaps your interrupt changes the value of 'b' every time you press a button.  You need the code to really check the value of b every time it calculates a, and not rely on it always being 7.

Here is a fuller explanation.