String

  • String is collection of only char datatype.
  • string size can be changed if it is a char pointer.
  • The last character of a string is a null – ‘\0’ character.

When manipulating a string (ex. Algorithm) remember that a string is nothing but a character array Ex. ['c', 'h'...]

whenever we have a string in any platform we have an encoding being used. Even if we didn't specify any encoding:

  • either the default encoding of the operating system will be used
  • or it will be taken from a configuration parameter