compile to the same thing; a char array just big enough to contain the string "Hello World", including the null terminator (i.e. 12 characters), as does (with more typing):
Are 'character arrays' and 'C-style strings' synonymous terms ?
No.
A C-style string is a series of characters (chars if it's a narrow string) with a terminating null.
A C-style string is always a character array, but an array of characters is not necessarily a C-style string. A character array does not have to have a terminating null in it.
compile to the same thing; a char array just big enough to contain the string "Hello World", including the null terminator (i.e. 12 characters), as does (with more typing):
A C-style string is a series of characters (chars if it's a narrow string) with a terminating null.
Partly not understood.
'narrow string' is unfamiliar to me. Qick googling shows there are obviously narrow and wide character strings, have to read up on this.
Besides, I always took 'chars' as short form (synonymous) to 'characters'.
Obviously not as I gather from your reply ?
A C-style string is always a character array, but an array of characters is not necessarily a C-style string. A character array does not have to have a terminating null in it...
narrow string = string of char (which are usually 8 bit, though this is not required by the standard. They do have to be (a) at least 8 bit, and (b) the same size as a byte is for the architecture.)
wide char = string of wchar_t which is 2-byte UTF-16 for Windows but 4 bytes UTF-32 for Linux and OS X.
Some things in above reply are over my head for now as beginner (e.g. I have now idea what ROW is), but since keywords and links are given I can check for further info and my main questions are answered I'll mark as solved.