c / beginner
Snippet
The Character Datatype
The char datatype is used to store a single character. In C, character literals must be enclosed in single quotes.
snippet.c
1
char grade = 'A';
Breakdown
1
char grade
Declares a variable named 'grade' of type character.
2
= 'A';
Assigns the character 'A' to the variable.