What are macros? What are its advantages and disadvantages?
Question :
What are macros? What are its advantages and disadvantages?
Macros are abbreviations for lengthy and frequently used statements. When a macro is called the entire code is substituted by a single line though the macro definition is of several lines.
The advantage of macro is that it reduces the time taken for control transfer as in case of function. The disadvantage of it is here the entire code is substituted so the program becomes lengthy if a macro is called several times.
Similar Questions
What is storage class? What are the different storage classes in C?
What is the use of typedef?
What are register variables? What are the advantages of using register variables?
Describe about storage allocation and scope of global, extern, static, local and register variables?
Where does global, static, and local, register variables, free memory and C Program instructions get stored?
Where is the auto variables stored?
What is static identifier?
What are macros? What are its advantages and disadvantages?
What does static variable mean?