I'm writing some code to check my understanding of pointers & arrays.
This output comes from the code below:
Address[0]: 536903648
Address[1]: 536903652
Value[0]: 0
Value[1]: 1
Value[0]: 1
My question is: if int's are 2-bytes, why isn't Address[1] 536903650 ?
int i[2] = {0,1};
int *p = i;
Serial.print(F("Address[0]: "));
Serial.println((long)i, DEC);
Serial.print(F("Address[1]: "));
Serial.println((long)(i + 1), DEC);
Serial.print(F("Value[0]: "));
Serial.println(*p, DEC);
Serial.print(F("Value[1]: "));
Serial.println(*(p + 1), DEC);
*p++;
Serial.print(F("Value[1]: "));
Serial.println(*p, DEC);