The character data type is one of the primitive data types by C++ programming language. The character data type uses keyword and it has a minimum size of or .
This is good enough to hold any characters because the values of characters in keyboard lies between . In other words, there are total characters in character set.
Learn C++ programming basics before you begin with character data types.
There are many types of character data types in C++. See the list below.
- unsigned char
- signed char
The most common form usage is and its size of good enough to hold any machine’s basic character set. The is the keyword.
The plain is unsigned in most machines and its size if . But, the values it can take ranges from to .
The is also of and it takes positive as well as negative values. The range is from to . In some machines, it is to .
This character data type can hold any character set which include not only the basic character set, but any extended character set of a system. The extended characters are wider than bits and starts with .
For example, .
char16_t and char32_t
The and is to represent the character sets which is any natural language.
Let Us C++
One of the best selling book in C++ programming language. A perfect book for beginners and people who want to prefer self-study in step by step manner. Simple and easy narration style made this book very popular. The book assumes that you don’t have programming experience and starts with basic to more advanced topics.