In Programming C Fundamentals "Character Constants"

A character constant is a single character, enclosed in apostrophes, ( i.e single quotation marks). They include the letters of alphabet  ( lowercase and uppercase), the numerals 0 to 9, punctuation marks such as ,; and ? and special characters such as &.
Notice that is possible for the computer to store a number as a character value . However because the computer stores character values differently  than numeric values, the computer can no longer perform arithmetic operations on these numbers, Virtually all the personal computers make use of the ASCII character set to encode a character, the standard ASCII code uses 7-digit binary numbers
i.e number consisting of various sequences of 0s and 1s, the code can represent 128 different characters since there are 128 different possible combinations of equivalent of the 7 bits that represent each character, foe example the ASCII code for 'A' is 65, Therefore after making declaration, you can make either of flowing assignment statements.
Symbolic Constants
A Symbolic Constants is a programmer-defined identifier that is replaced with a sequence of characters called text. The replacement text ma represent a numeric an identifier to appear in place of numeric constant, a character constant or a string constant, Thus a symbolic constant allows string constant.

0 Responses to “In Programming C Fundamentals "Character Constants" ”

Post a Comment