String handling in C++
C++ provides the following two types of string representations −
- The C-style character string.
- The string class type introduced with Standard C++.
The C-Style Character String
- The C-style character string originated in the C programming language and is still supported in C++.
- This string is a one-dimensional array of characters, with the null character ‘0’ at the end.
- A null-terminated string, on the other hand, includes the characters that make up the string, followed by a null.