The parameter to a function can be a copy of a value that is represented by variable or can be a reference to a memory space that stores value of variable. The former is referred to as pass by value and the latter is referred to as pass by reference. The difference is that when parameters are passed by value the changes made to the variable value within the function is not reflected in the caller function, but when passed as reference changes are reflected outside the called function. The structures are always passed by reference.
Advantage: Macros and Inline functions are efficient than calling a normal function. The times spend in calling the function is saved in case of macros and inline functions as these are included directly into the code. Disadvantage: Macros and inline functions increased the size of executable code. Difference in inline functions and macro 1) Macro […]
It is illegal to declare a recursive function as inline. Even a function is declared as inline compiler judges it to be inline or not. Many compilers can also inline expand some recursive functions; recursive macros are typically illegal.