In this C++ tutorial, you will learn about string representation and handling, how a string is represented, end string notation, initializing char array, character representation, string literals, example program to understand the character array concept and the accessing of character array in detail and how to represent an array of Strings.
How is a string represented?
Strings, or sequences of characters, are represented as arrays of char elements. For example, when a programmer wants to represent a char array Exforsys having 30 elements it is declared:
This means the character array has 30 storage location allocated where it can store up to a maximum of 30 characters.
End String Notation
The character array can store the specified maximum of array limit. This means it can store less than the allocated array limit up to the maximum. It is essential that a notation exist to mark the end of character array or string representation. This end of character array is denoted using backslash zero ‘