Size of char array

char request [] = "Hello\n"; Serial.println(request) gives the output 7.

How is it that the char request [] = "Hello\n" get the length 7? Should not it instead be 6 then \ n correspond well just one character?

/peter

Shouldn't

Serial.println(request);

print Hello, not a number.

Assuming you used sizeof, then seven is correct. strlen would have returned six.

thanks! strlen() gives the correct answer. - but where to find the documentation? /p

found it at http://arduino.cc/en/Reference/StringObject thanks again /p