For the first ques the output will be have fun...have fun...have fun...have fun...have fun... dis is because printf will not take into consideration \n because of its format...unless and untill we do not write sm %d or %s or %u etc it wont access the portion of the statement after comma operator... i hope it is clear...
On Mon, Aug 15, 2011 at 1:40 PM, Anil Arya <[email protected]> wrote: > a##b means you are using the value of ab whatever the value of a and b is > given. > > > On Mon, Aug 15, 2011 at 1:13 PM, Sanjay Rajpal <[email protected]>wrote: > >> ## is used for concatenation in C. >> >> >> >> On Mon, Aug 15, 2011 at 12:40 AM, Nitin <[email protected]> wrote: >> >>> #include<stdio.h> >>> #define fun(arg) do\ >>> {\ >>> if(arg)\ >>> printf("have fun...","\n");\ >>> }while(i--) >>> >>> main() >>> { >>> int i=6; >>> fun(i<5); >>> } >>> >>> give the answer and please give the reason for this >>> >>> #include<stdio.h> >>> #define fun(a,b) a##b >>> main() >>> { >>> int a, b, ab; >>> a = 1, b = 2, ab = 3; >>> printf("%d %d", fun(a,b), ab); >>> return -1; >>> >>> } >>> please tell me the use of this # in this program >>> ~ >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/algogeeks?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > > > -- > Anil Kumar Arya > B.Tech III year > computer science & engineering > M.N.N.I.T Allahabad. > > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Aditi Garg Undergraduate Student Electronics & Communication Divison NETAJI SUBHAS INSTITUTE OF TECHNOLOGY Sector 3, Dwarka New Delhi -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
