What is the Difference between Macro and ordinary
definition?
Answer Posted / d g patel
1. Macro takes parameters where as ordinary definition does
not.
2. Based on the parameter values to macro it can result in
different value at run time. Ordinary defination value
remains same at all place at run time.
3. Macro can be used for conditional operations where as
definition can not.
4. Using macro one can achieve inline functionality in C
ie. macro can be a function performing simple operations.
This is not possible using definitions.
Is This Answer Correct ? | 46 Yes | 9 No |
Post New Answer View All Answers
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
Why is sprintf unsafe?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
What is dynamic variable in c?
What is the difference between functions abs() and fabs()?
Explain the use of function toupper() with and example code?
How to Throw some light on the splay trees?
How can I remove the leading spaces from a string?
What are volatile variables in c?
What is the full form of getch?
write a program to display all prime numbers
What are the application of void data type in c?
What is %lu in c?
Explain what is the general form of a c program?
What are lookup tables in c?