Re: [algogeeks] Re: #in macros

2012-10-30 Thread Vikram Pradhan
Macro arguments are scanned and expanded before the substitution in macro body unless they are convert to a string representation (using #) or concatenated with other tokens (using ##). Xstr(oper) = Xstr(multiply) =str(multiply)=multiply// in Xstr(x) , x is a simple argument so it will

Re: [algogeeks] Re: #in macros

2012-10-30 Thread rahul sharma
ossam link...thnx..vikram On Tue, Oct 30, 2012 at 3:20 PM, Vikram Pradhan vpradha...@gmail.comwrote: Macro arguments are scanned and expanded before the substitution in macro body unless they are convert to a string representation (using #) or concatenated with other tokens (using ##).

[algogeeks] Re: #in macros

2012-10-28 Thread rahul sharma
And when char *opername=str(oper); then o/p is operwhy behaviour is diff. in 2 cases On Sun, Oct 28, 2012 at 2:53 PM, rahul sharma rahul23111...@gmail.comwrote: #includestdio.h #include str(x) #x #define Xstr(x) str(x) #define oper multiply int main() { char *opername=Xstr(oper);