Site hosted by Angelfire.com: Build your free website today!

Character Strings



When the program asks the user to input a word, a char variable needs to be used.  Variables need to be defined before they are used.  After to first bracket, char needs to be typed in and the maximum number values that variable can hold.

The minimum range of values for the char variable is -128 to 127 values (the number means two things: 1. alphabet letters and, 2. numbers can be used integrally).

After typing in the char variable, you need to type in the name of the variable you want to use.  If the name has more than one word, use the underline character (_) in the place of spaces.  After typing in the variable name, the last thing is to tell the computer how much memory to commit to that variable.  The brackets ([]) are used to do this.

Here is an example:

main ()
{
    char Michael_Walling [25];
    .......
}

When storing numbers, the unsigned char can also be used.  The range of this variable type is 0 to 255.  This is also very useful if the user must type in a sentence or two to be stored in the program.




Return to Main                                        Number Variables                            Back to Main Page