Upper-case and Lower-case

C allows you to use both upper- and lower-case letters in statements. But just because it allows you to use both kinds of letters doesn't mean that it doesn't care what case you use. C is case-sensitive, which means that it treats `a' and `A' as different letters.

You could, for example, have one variable named total and have a second variable named Total, and those two variables would be different from each other. But if you did this it would be very easy to get the two variables mixed up, and it would be hard for you to write and understand your own program.

Even though C allows you to use both upper- and lower-case letters in program statements, C programs tend to be written in lower-case more than in upper-case. For example, the main function is always named main. It is never called Main or MAIN.


Eric N. Eide
Hamlet Project
Department of Computer Science
University of Utah