Exercises

1. Locate the system header files limits.h and float.h on your machine. Examine the files to see what’s in them. If these files include other header files, be sure to track them down as well to examine their contents.

2. Define a macro called MIN that gives the minimum of two values. Then write a program to test the macro definition.

3. Define a macro called MAX3 that gives the maximum of three values. Write a program to test the definition.

4. Write a macro called IS_UPPER_CASE that gives a nonzero value if a character is an uppercase letter.

5. Write a macro called IS_ALPHABETIC that gives a nonzero value if a character is an alphabetic character. Have the macro use the IS_LOWER_CASE macro defined in the chapter text and the IS_UPPER_CASE ...

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.