What Are Character Constants In C++ Programming Language ?

A character represented within single quotes denotes a character constant.
Here are some examples of it….
‘?’ etc…

Character data type>> Any character belonging to the ASCII character set is considered as a character data type whose maximum size is 8 bits long.
The char is a keyword to represent the character data type in C++.
Character constants are always represented within single quotes.
Plain char, signed char and unsigned char are three distinct types.
A char, a signed char and an unsigned char occupy the same amount of memory space.
The classification of the char data type

is dependent on the version of the C++ compiler.

Declaration of the character constants…
char x;
char x,y,z;

The char stands for the character data for declaring the character constants.
The declaration format of character data type is same as that of the declaration of the integer, floating or string constants.
The backslash() is used to denote non-graphic characters and other special characters for specific operations.
The following characters

are used as non-graphic characters:

‘a’>> alert a bell character
‘ ’>> new line
‘ ’>> horizontal tab
‘’>> backspace
‘ ’>> carriage return
‘f’>> form feed
‘v’>> vertical tab
‘\’>> backslash
‘’’>> single quote
‘’>> null character
‘?’>> question mark
‘00’>> octal value
‘xhh’>> hexadecimal value

For more of such hot topics read my other posts here :

Visit my new website

Article Written By jontymagicman

I am DInesh Varyani.

Last updated on 26-07-2016 175 0

Please login to comment on this post.
There are no comments yet.
How Global Warming Is Problem Of Concern ?
God Is For Real : Proof