Character is a symbol in programming language that has meaning.
A character can be any letter, number, punctuation marks, symbols or whitespace. For example, the word "character" consists of 8 characters, and the phrase "Hello World!" consists of 12 characters including the whitespace and exclamation mark.
In programming character is a datatype. We can declare a variable as of a character type and store characters in the variable. For example, in C and Java, we write,
char first = 'a';
Characters when storing in a variable must be inserted between single quotes.
String is another datatype in programming, which is a modified version of character datatype. Strings are used to store more than one characters. For example,
string sentence = "Hello World!";