Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language problems: char a, b; Aren't a=97, b = 98A and B character variables? Why can they be assigned to an integer constant? beginner
C language problems: char a, b; Aren't a=97, b = 98A and B character variables? Why can they be assigned to an integer constant? beginner
A very simple question, I am also learning C language. A and b are character types,

If you want to explain your problem, you should know how to store character data in C language. Character data stored in C language is actually an ASc code that stores corresponding character data, and ASc code is an integer. So this is normal. Assign the ASc code of a character to a character variable.