How do you define characters in the C programming language?
In C language, characters can be defined in two ways:
- Enclose characters with single quotation marks, for example:
char ch = 'A';
- Representing characters using ASCII code, for example:
char ch = 65; // ASCII码中65对应的字符是'A'
It is important to note that variables of character type are defined using the keyword char.