Originally Posted by
grumpy
2) By convention, a string literal (such as "Hello") is represented in the form of an array of char, with a zero sentinel at the end. So "Hello" is represented as an array of 6 chars, with values 'H', 'e', l', 'l', 'o', and zero. A character with value zero is also equivalent to '\0' (the \xxx as a char constant treats xxx as a hex value). All functions in C that work with strings (strcpy(), strcmp(), strlen(), etc etc) adhere to this convention (for example, strlen() keeps counting characters until it finds one with value zero). A convention is not a law of nature.