Skip to main content


String is an object that represents a group or a sequence of characters. String is represented as a one-dimensional array of characters and ends with a (null character). String is defined in the same way as the other data types (integer, character). The first step will be to declare a string variable and then assign a value to the variable. The string is an object that belongs to the std: string class.