Literals

The term literal constant or literal refers to a value that occurs in a program and cannot be changed. The C language uses the term constant in place of the noun literal. The adjective literal adds to the concept of a constant the notion that we can speak of it only in terms of its value. A literal constant is nonaddressable, which means that its value is stored somewhere in memory, but we have no means of accessing that address.

Every literal has a value and a data type. The value of any literal does not change while the program runs and must be in the range of representable values for its type. The following are the available types of literals:

C C99 adds the compound literal as a postfix expression. The language feature provides a way to specify constants of aggregate or union type.

Linux Mac OS X The Pascal string form of a string literal is also accepted.

Related References

IBM Copyright 2003