#include<stdio.h>
#define power(a) #a
int main()
{
 printf("%d",*power(432));
  return 0;
}

the printf statement, after preprocessing, will look like
printf("%d",*"432");

so, when u print the value at the first position of the string, 52, which is
the ascii value of 4, will be printed.

On Thu, Jun 23, 2011 at 3:40 PM, vaibhav shukla <vaibhav200...@gmail.com>wrote:

> #include<stdio.h>
> #define power(a) #a
> int main()
> {
>  printf("%d",*power(432));
>   return 0;
> }
>
>
> ans is 52 on gcc. Explain plss
>
> --
>   best wishes!!
> Vaibhav Shukla
>     DU-MCA
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Shachindra A C

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to