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 the use of bit field?
What is a ternary operator in c?
What are the 4 types of organizational structures?
How is null defined in c?
List some of the static data structures in C?
What is the heap in c?
shorting algorithmS
How do you list a file’s date and time?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
Is int a keyword in c?
When should you use a type cast?
How can you invoke another program from within a C program?
How can I make sure that my program is the only one accessing a file?
What is echo in c programming?
What is the difference between NULL and NUL?