Re:How to find size of an array in C without sizeof
by Stratoscope on Monday December 26, 2016 @05:54PM
(#13260211)
You are correct, the compiled code will be the same whether you use a macro or not. In fact, this is true for any C macro. A macro is merely a source code text substitution done by the preprocessor. Using a macro is exactly the same as writing out the equivalent macro expansion everywhere you use it.
My suggestion to use a macro is not because of any difference in the compiled code, but to improve the readability of the source code.
My suggestion to use a macro is not because of any difference in the compiled code, but to improve the readability of the source code.