O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parts of a Language

The ability to declare variables is part of the facilities offered by the language, as is assigning a specific type to each one. The declaration of a variable is usually a statement within the language that is comprised of the type plus variable name. You say that you have declared a variable of a given type, and from that point on, that variable can only contain data of the given type.

A variable name usually follows certain conventions. For example, it cannot be comprised solely of a number because it might be confused with a constant numeric value. Similarly, it cannot contain spaces because that would make it two individual words, which could be misconstrued. Programming is a precise exercise.

Another constraint on the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required