October 25, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video