Problem with twodimensional array

I have got this programm which demonstates my problem which I have stuck during another project.

int data [6][100];
int rotation = 0;

void setup() {
  
  delay(3000);
 Serial.begin(9600); 
Serial.println("test");

  
}

void loop () {

delay(1000);
  Serial.println(rotation); 
  data[6][rotation]  = 42; 
  Serial.println(rotation); 
}

On the serial monitor it produces the following output:

test
0
0
42
42
42
42
42
42
42
42
42
42
42
42
42
42
42
(etc.)

In my imagination the line "data[6][rotation] = 42; " should assign the value "42" to the data array at position [6][rotation] which would be [6][0] .
but after the first run of the loop() function it appears that the value of the variable "rotation" has changed to 42. So I assume that this line "data[6][rotation] = 42; " is not doing what I am assuming.
Could you please help me ?

Marc

The problem is the "6". That position don't exist in the array. Try:

  data[5][rotation]  = 42;

Thank you very much! I thought if i write data[6] it would be from 0-6 .Always confusing me , thank you again and forgive me this stupid mistake.