Character type variables are used to store character values. Syntax of declaring a character variable is specific to the programming language that you are using. If a user tries to create a character variable and assign it with a non-character value, the program will throw an error. The character data type is the smallest data type in programming.
Example of declaring a character variable:
char a = ‘w’;
Any character values can be declared as a char variable.