In C, a string is not an intrinsic type. A C-string is the convention to have a one-dimensional array of characters which is terminated by a null-character, by a
This means that a C-string with a content of
"abc" will have four characters
See the basic introduction to strings example.
- char str1 = “Hello, world!”; /* Modifiable */
- char str2 = “Hello, world!”; /* Modifiable */
- char* str3 = “Hello, world!”; /* Non-modifiable*/