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 |
ATM machine and railway reservation class/object diagram
what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
What is the difference between text and binary modes?
write a program to convert a expression in polish notation (postfix) to inline (normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix
int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?
Is c procedural or functional?
how to convert binary to decimal and decimal to binary in C lanaguage
7 Answers BPO, Far East Promotions, IBM, RBS,
what is the coding of display the factorial of a number using array and function?
how logic is used
Is there any possibility to create customized header file with c programming language?
can i know the source code for reversing a linked list with out using a temporary variable?