What is the Difference between Macro and ordinary
definition?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ambar
macro is an independently executive function which executes
only when called from within the calling program . each
time it is called it takes a different parameter whearas an
ordinary defination parameters remains same till the life
of a program.
| Is This Answer Correct ? | 11 Yes | 2 No |
Answer / himanshu goel
macro definitions can be used for conditional compilation
whereas ordinary cannot
| Is This Answer Correct ? | 8 Yes | 13 No |
what is diffrence between string and character array?
What is the scope of static variables in c language?
what is the difference b/w compiler and debugger?
1 1 2 1 2 3 1 2 3 4 1 2 3 1 2 1 generate this output using for loop
If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..
Find string palindrome 10marks
5 Answers Honeywell, Infosys, Riktam, Roland,
What is a good way to implement complex numbers in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......
How can I set an array's size at run time?
Write a program to print distinct words in an input along with their count in input in decreasing order of their count..
dibakar & vekatesh..uttejana here..abt ur reply for in place reversal of linked list..wats p stands for there?