DEV Community

Kerimova_Manzura
Kerimova_Manzura

Posted on

What is Char in C++?

What Is Char in C++?
Computers only deal with numbers and do not understand characters as such. But as humans, we like to read and write using the characters of our respective languages. Thatโ€™s why a character type is integrated into programming languages like C++.

char allows you to store individual characters or arrays of characters and manipulate them. But how does it all work? What are best practices for dealing with char in C++? Weโ€™ll now address these questions.
In C++, the char keyword is used to declare character type variables. A character variable can store only a single character.

Top comments (1)

Collapse
 
pauljlucas profile image
Paul J. Lucas

And it can't even store a single character. It can do that only if you stick with ASCII โ€” which most of the world doesn't.