char is a narrow integer type used to encode characters from C’s basic character set and to represent small integer values. That set includes Latin letters, digits, and coding punctuation; special and non-Latin characters usually lie outside it. Most platforms use ASCII transparently. section 6.1.5
Character arrays and strings
char jay0[] = "jay"; creates a string with four elements: 'j', 'a', 'y', and a terminating 0. Equivalent initializations can write the characters explicitly. By contrast, char jay4[3] = { 'j', 'a', 'y' }; has no room for the terminator and is not a string. TAKEAWAY: a string is a 0-terminated array of char. section 6.1.5
Use the standard library according to whether an object is merely a char array or a 0-terminated string:
- Use memcpy, memcmp, and memchr with char arrays when an explicit length is available. section 6.1.5
- Use strlen, strcpy, strcmp, and related str functions only with strings. section 6.1.5




