• Macro templates are replaced by macro expansion by preprocessor.
• Whenever function is called, execution goes to that function, calculations are performed and execution returns to main.
• Macros are faster than functions.
• In macros program size increases if called for more times.
• In function program remains compact even though called for several times.
• No address is associated with macro identifier and hence pointers cannot be used with macros.
• When we pass the arguments to the macro, it never checks for their data types and checks for only the number of arguments.
• Whenever function is called, execution goes to that function, calculations are performed and execution returns to main.
• Macros are faster than functions.
• In macros program size increases if called for more times.
• In function program remains compact even though called for several times.
• No address is associated with macro identifier and hence pointers cannot be used with macros.
• When we pass the arguments to the macro, it never checks for their data types and checks for only the number of arguments.
good
ReplyDelete