A
character constant is a single alphabet, a single digit or a single
special symbol enclosed in apostrophes( i.e. single quotation marks).
Both the inverted commas should point to the left. For example, ’A’ is a
valid character constant whereas ‘A’ is not.
Character constants have integer values that are determined by the
computer' particular character set. Thus the value of character
constant may vary from one computer to another.
The maximum length of a character constant can be 1 character.
Example-
'a'
'I'
'56'
'='
0 comments:
Post a Comment
Hey this is a test comment