OiO.lk Blog C# Does a C pointer to volatile refer to volatile memory when it is subscripted?
C#

Does a C pointer to volatile refer to volatile memory when it is subscripted?


Consider these two definitions:

volatile int a[10];
volatile int *p = a; 

If we refer to a[3] that memory location be considered to be volatile storage. Is it the case in C that p[3] also refers to volatile storage, though it is declared as a pointer, and not as an array?



You need to sign in to view this answers

Exit mobile version