1.

Can A Pointer Be Volatile?

Answer»

If we see the DECLARATION volatile int *p, it means that the POINTER itself is not volatile and points to an integer that is volatile. This is to inform the compiler that pointer p is POINTING to an integer and the value of that integer may change unexpectedly EVEN if there is no code INDICATING so in the program.

If we see the declaration volatile int *p, it means that the pointer itself is not volatile and points to an integer that is volatile. This is to inform the compiler that pointer p is pointing to an integer and the value of that integer may change unexpectedly even if there is no code indicating so in the program.



Discussion

No Comment Found