As Delta-G pointed out, an array name without the brackets is the memory address where that array starts in memory. So, if the following array were stored at memory address 100:
char buffer[10];*
then:
myFunction(buffer); // Sends lvalue 100 (i.e., a memory address) to myFunction()*
myFunction(&buffer[0]); // Send the same lvalue to myFunction()*
Run the following code and see if you can figure things out:
void setup() {
char myBuffer[] = {"0123456789####456789"};
char term[] = "####";
int i;
int len = strlen(term);
Serial.begin(9600);
for (i = 0; i < sizeof(myBuffer); i++) {
if (strncmp(myBuffer + i - len, term, len) == 0) {
Serial.print("---> Matched when i = ");
Serial.println(i);
} else {
Serial.println("No match");
}
}
}
void loop() {
}