(a)A character constant is a single alphabet, a single digit or a single special symbol enclosed within single inverted commas. Both the inverted commas should point to the left. For example, ’A’ is a valid character constant whereas ‘A’ is not.
(b)The maximum length of a character constant can be 1 character.
Ex.: 'A'
'I'
'5'
'='
can we write any character name in single quotation mark?
ReplyDeletee.g. 'hello'
is it correct?
No this could not be treated as a character constant as in character constant the maximum length is of 1 character only
DeleteNot correct since the maximum number of character must be one.
Delete