What is a C-string? (again and again...)
- As repeated for so many times in the previous chapters
- A C-style string is a NULL-terminated character array
- A string constant is enclosed by a pair of double-quotes (")
- "This is a string constant!"
- A string constant is of the type
- char* or char[] and implicitly cast to const char* or const char[]
- A string ends with a null character
- const char* s = {'a','b','c','\0'};
- is identical to
|
Facebook