How do you update an array within a struct array using a function

@BitSeeker I learned something interesting in testing my theory on an 8 bit Arduino Uno R3.

The following code works as expected and prints 32640.

For a surprise that I will leave you to ponder, remove the keyword "unsigned" from the declaration/initialization of "y". Hint: it does validate what I proposed in reply #17.

void printit(int x){
  Serial.print(" x = "); 
  Serial.println(x);
}
void setup() {

Serial.begin(115200);
while(!Serial) delay(1); //wait for connection
unsigned char y = 255;
printit( y<<7);
}

void loop() {}