1. Inline follows strict parameter type checking, macros do not.
2. Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions.
1.Macros are always expanded by preprocessor, whereas compiler may or may not replace the inline definitions. 2.comiler can chek the error while we are using the inline function but not incase of macro.
Macros does not return any return values, so how can compiler judge that the return value should be stored in what type of data. some Compiler directly assign return value without checking data type.
What will be output of the following code #include using namespace std; class abc { public : void main() { cout<<" Its main function "< } }; int main(int c, char **v) { abc a; if(c<1) { cout<<" Error can not accept it "< exit(1); } cout<<" its in main program "< a.main();
How is static variable stored in the memory? ( if there are 2 functions in a file,and the static variable name is same (ex var) in both the function. how is it keep seperately in the memory).