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.
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).
Hey anybody help me to write code for this program wap which display year,month & day presents in a year for eg. 1. no. is 14 print 2 weeks 2. no is 90 print 3 months 3. no is 365 print 1 year user can input any no