volatile void * ptr;
Whether ptr
is volatile
or it points to the volatile location
.
So the actual doubt is :
Is the same thing applied to the above declaration as it applied with const
qualifier ?
Little explanation will help me a lot.
It's a pointer to volatile data. If the pointer itself should be volatile but not the data it points at, you'd use:
void * volatile ptr;
So yes, it works the same way as the const
modifier.