...
It is common for an array variable to be initialized by a string literal and declared with an explicit bound that matches the number of characters in the string literal. Section 6.7.9, para. paragraph 14, of the C Standard [ISO/IEC 9899:2011], says:
...
CERT C++ Secure Coding Standard | STR36-CPP. Do not specify the bound of a character array initialized with a string literal |
ISO/IEC TR 24772 | String termination Termination [CJM] |
Bibliography
[ECTC 1998] | Section A.8, "Character Array Initialization" |
[ISO/IEC 9899:2011] | Section 6.7.9, "Initialization" |
[Seacord 2005a] | Chapter 2, "Strings" |