Literals

The term literal constant, or literal, refers to a value that occurs in a program and cannot be changed. C onlyThe C language uses the term constant in place of the noun literalC only. 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.

There are the following different types of literals:



Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us