In turbo compiler it's o/p is 216 and in dev it's 150.. Help me out.. On Fri, Aug 12, 2011 at 12:45 AM, sagar pareek <[email protected]>wrote:
> after expansion of macro > it will be c=(++x)*(++x)*(++x); > > now it be solved as > c= 5*5*(++x); > c=25*6; > c=150 > > > On Fri, Aug 12, 2011 at 12:38 AM, Puneet Chawla <[email protected] > > wrote: > >> #define cube(x) (x)*(x)*(x) >> main() >> { >> int x=3,c; >> c=cube(++x); >> printf("%d",c); >> >> return 0; >> } >> >> will anyone please tell me why o/p is 150.? >> >> -- >> With regards >> ............ >> Puneet Chawla >> >> -- >> 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. >> > > > > -- > **Regards > SAGAR PAREEK > COMPUTER SCIENCE AND ENGINEERING > NIT 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. > -- With regards ............ Puneet Chawla Computer Engineering Student NIT Kurukshetra -- 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.
