Qualifiers: long, long long, short, unsigned, and signed

If the qualifier long is placed directly before the int declaration, the declared integer variable is of extended range on some computer systems. An example of a long int declaration might be this:

long int factorial;

This declares the variable factorial to be a long integer variable. As with floats and doubles, the particular range of a long variable depends on your particular computer system.

To display the value of a long int using NSLog, the letter l is used as a modifier before the integer format characters. This means that the format characters %li can be used to display the value of a long int in decimal format.

You can also have a long long int variable, or even a long double variable ...

Get Programming in Objective-C, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.