I don't write a lot of C, so I'm always discovering things I only partly understand in the Arduino variety. One of these is how Serial.print
handles char[]
.
Does Serial.print always require a null terminator? In the case of (say) Serial.print(88, DEC);
is a null implied?
What happens in the following cases?
char buff[3] = "ABC"; // warned because no room for a null
Serial.print(buff); // will absence of a null cause overrun?
char buff[4] = "ABC"; // now there's a null
Serial.print(buff); // will the null character be sent too?
Any references appreciated.