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
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What is the difference between malloc calloc and realloc in c?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What are the keywords in c?
What are the basic data types associated with c?
What's the difference between constant char *p and char * constant p?
How do I get an accurate error status return from system on ms-dos?
When do we get logical errors?
What is c value paradox explain?
What is s or c?
Can you write the algorithm for Queue?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How will you delete a node in DLL?
write a proram to reverse the string using switch case?
Write a program to print fibonacci series without using recursion?