Character constant and String constant

A character constant is a character written between single quotes. Although called character constant it represents an interger value. Its value equals to numeric value of the character in the machine's character set.

In the ASCII character set:
'\n' = 10
'0' (zero) = 48
'A' = 65
'a' = 97

A sequence of characters in double quotes, like "hello, world\n", is called a character string or string constant.

Comments

Popular posts from this blog

shriranga kamalakanta

Deva Gharache dnyat kunala

Hindu aikya ghosh