answersLogoWhite

0

When you declare a const you provide a guarantee to the compiler that the value will never be changed by your program; the value is constant. All constants are implicitly static, so they are always allocated in the program's data segment rather than on the stack.

When you declare a variable as being volatile, you are stating to the compiler that the memory referred to by that variable is not under the direct control of your program and that external processes may change the value at any time.

User Avatar

Wiki User

10y ago

What else can I help you with?