In C++, when you initialize character arrays, a trailing '\0' (zero
of type char) is appended to the string initializer. You cannot
initialize a character array with more initializers than there are array
elements.
In ISO C, space for the trailing '\0' can be omitted in this type of
information.
For example, the following initialization is not valid in C++:
char v[3] = "asd"; //not valid in C++, valid in ISO C //because four elements are required
This initialization produces an error because there is no space for the implied trailing '\0' (zero of type char). The following initialization, for instance, is valid in C++:
char v[4] = "asd"; //valid in C++
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.