answersLogoWhite

0

What is the use of define?

User Avatar

Anonymous

17y ago
Updated: 8/16/2019

POSSIBLE ANSWER I'm assuming you mean #define as used in C Programming. This is a preprocessor definition. During compilation, the compiler reads all of the #define statements (and #include, and other statements starting with #). Then it begins compiling, replacing the tokens that were #define-d wherever they are found. This code: #define num 5 y = 3 + num; is seen by the compiler (after the preprocessor stage) as: y = 3 + 5; The same thing happens with #include, except instead of a short replacement such as "5" it replaces the #include line with an entire file.

User Avatar

Wiki User

17y ago

What else can I help you with?