#define in C | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

#define in C

https://www.sololearn.com/post/348153/?ref=app Is the correct answer #define ? Because # include directivetell the preprocessor to start searching for the file listed #define directive directs the preprocessor to replace all subsequent occurrences which directive works both search and replace?

23rd Apr 2020, 6:52 AM
Mohamad Alkaleeh
2 Answers
+ 2
Yes, #define is the correct answer. #include: Preprocessor searches for the file in some directories and the contnent of a specified file is inserted into source file instead of #include directive. #define: Preprocessor searches and replaces all subsequent occurences of specified macro (till end of file or #undef directive)
23rd Apr 2020, 7:36 AM
andriy kan
andriy kan - avatar
0
Thanks 👍👍
23rd Apr 2020, 8:09 AM
Mohamad Alkaleeh