What is a String?

String is an collection of characters stored under a single name.

It contains following characters enclosed in double quotes.

  • alphabets
  • Numbers
  • special characters
  • Spaces and tabs

It is a data type in some programming languages. It contains a literal string value or an declare as an variable, Variable value can be changed it’s size.

Generally string size is count as number of characters in it.

String and array characters both contains group of characters, But they are not same and equal. Since string is terminated with \0 character.

String data structure operations

  • length
  • append
  • reverse a string
  • substring

Difference between String and Array