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
What is non linear data structure in c?
Write a program to reverse a linked list in c.
What is the difference between int main and void main?
What is the difference between array and linked list in c?
Is there a way to jump out of a function or functions?
What are qualifiers?
Why void is used in c?
How many parameters should a function have?
Who invented bcpl language?
Why doesn't C support function overloading?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What does c mean before a date?
What is main return c?
Place the #include statement must be written in the program?
How to draw the flowchart for structure programs?