I searched in web where will be the C macros stored in memory and how does it consumes more memory compared to functions? Could not get any satisfying answer .Can anyone please
"The reason that this usually takes up more memory is that it gets repeated every time the macro is used."
With a modern compiler depending on the compile settings (FAST CODE/SMALL CODE) it may spot commonly used code and optimize it into a function (SMALL), or it may inline the code for speed (FAST).
It isn't always the case that the code will always be bigger depends on how good your optimizer is and the compiler settings you use.
Of course you could always use macros that call functions rather than contain large inline sections of code. That is totally down to your choice.