ABSTRACT

C provides a rich set of functions to perform conversions and tests with characters. Therefore, these functions are very useful for writing portable programs. Since a character in the American Standard Code for Information Interchange (ASCII) set is represented by an integer between 0 and 255, we can use the char type to store its value. Once a character is stored into a variable, it is the character's ASCII value that is actually stored. Handling of characters that represent integers usually confuses novice programmers. Essentially, when a character appears in an expression, either as constant or variable, C treats it as an integer and uses its ASCII value. Since C treats the characters as integers, we can use them in numerical expressions. When mixing numeric input with character input the program may behave unexpectedly and make novice programmers crazy enough to smash the computer.