Marking a variable const means that you can not change its assigned value.
Marking a variable volatile means that it may be changed by another thread or process so the compiler will always allocate it to addressable memory and never keep it in an internal register, nor optimise it away.
Hm, would that mean that a program would be generally slower and unsafer when volatile is used (although it CAN be good for multi-threaded applications)?
- it's a void pointer... meaning it can point to anything. There's no way to know what it points to. void pointers are type unsafe. They also need to be cast to some other pointer type before they can be dereferenced.
- it's a const pointer, therefore whatever data it points to cannot be modified via this 'x' pointer.