the output will be (b)
before looking for the reason, you should know the syntax of printf

*int printf(const char *format,....)*

the function at the string after the comma operator only if the format
string aks for any format specifier like %d or %f etc...u can try it like
this also in normal main function

*printf("piyush","sinha");

*It wil compile and run successfully...and u can guess the output too.... :)
*
*
On Mon, Jul 18, 2011 at 2:19 AM, aditi garg <[email protected]>wrote:

> #include<stdio.h>
> #define FUN(arg) do\
>                           {\
>                              if(arg)\
>                                printf("have fun...","\n");\
>                           } while(i--)
> void main()
> {int i=2;
> FUN(i<3);
> }
>
> A.have fun..
>   have fun..
>   have fun..
> B.have fun..have fun..have fun..
> C.Error : cannot use instructions in macro
> D.No output
>
> --
> 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.
>
>


-- 
*Piyush Sinha*
*IIIT, Allahabad*
*+91-7483122727*
* <https://www.facebook.com/profile.php?id=100000655377926> "NEVER SAY
NEVER"
*

-- 
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.

Reply via email to