What are the advantages of functions over macros; which are the cases when should we use Macros in C?
Answers
Answered by
0
FIRST OF ALL KNOW WHAT IS MACROS:--
---->a single instruction that expands automatically into a set of instructions to perform a particular task.
CASES IN C LANGUAGE:--->
A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to the compiler before entering into the actual coding (main () function). A macro is defined with the preprocessor directive, #define.
Regards
---->a single instruction that expands automatically into a set of instructions to perform a particular task.
CASES IN C LANGUAGE:--->
A macro is a name given to a block of C statements as a pre-processor directive. Being a pre-processor, the block of code is communicated to the compiler before entering into the actual coding (main () function). A macro is defined with the preprocessor directive, #define.
Regards
Similar questions
Science,
7 months ago
CBSE BOARD XII,
7 months ago
Science,
1 year ago
Computer Science,
1 year ago
Science,
1 year ago