Home » Arduino String

Arduino String

The string is a data type that stores text rather than the integer values. It is similar to other data types such as integer, float, etc., in Arduino.

The string is an array of characters or a set of characters that consists of numbers, spaces, and special characters from the ASCII table.

The string can be declared in the following ways:

  • char StrA[10];
  • char StringA[8] = {‘w’, ‘e’, ‘l’, ‘c’, ‘o’, ‘m’, ‘e’};

We can also add an explicit null character

  • char StringB[8] = {‘w’, ‘e’, ‘l’, ‘c’, ‘o’, ‘m’, ‘e’, ‘

You may also like