We use a preprocessor directive to create a constant macro. The preprocessor is a system program that is part of the C compiler. It automatically performs various operations prior to the translation of source code into object code. In C, preprocessing directives begin with the # symbol (which must begin the line). A semicolon must not be used at the end of the preprocessing directive. Only the preprocessing directive should be on the line. For example, the line
#define DAYS_IN_YEAR 365
is a preprocessor directive called a define directive.
No comments:
Post a Comment