C++ Character Set

In this tutorial you will learn about the C++ Character Set and its application with practical example.

C++ Character Set

In C++, character set is a set of all valid characters that can be used in a C++ Program. Characters set is used to specify the characters or symbols recognized by the language. Character set is a set of all valid characters that can be used to form words, numbers and expression’s in source programs. The source character set is consist of the characters used for the source program text, while the execution character set is the set of characters used during the execution of the program. It is not necessary that source character set match and execution character set are same.

Table Of Contents

C++ character set, includes following characters –

Letters:- A-Z, a-z

The 26 lowercase Roman characters:

The 26 uppercase Roman characters:

Digits:- 0-9

The 10 decimal digits:

Special Symbols :- Space + – ∗ ⁄ ^ \ ( ) [ ] { } = != < > . ′ ″ $ , ; : % ! & _ # <= >= @

The graphic characters:

White Spaces :- Blank space, Horizontal tab (→), Carriage return (↵), Newline, Form feed

Space( ),Horizontal tab (\t) , Carriage return(\v), New line(\n) , form feed (\f)

Other Characters :- C++ can process any of the 256 ASCII characters as data or as literals.

Example:-

Output:-

cpp_character_set_example

In this tutorial we have learn about the C++ Character Set and its application with practical example. I hope you will like this tutorial.