Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone explain output

#define power(a) #a
  int main()
  {
    printf("%d",*power(432));
     return 0;
  }

can anyone explain the o/p??
the o/p is

52

like image 821
akash Avatar asked Dec 15 '22 13:12

akash


1 Answers

It is equivalent to:

printf("%d",*"432");

which is equivalent to:

printf("%d", '4');

and the ASCII value of '4' is 52.

like image 178
ouah Avatar answered Dec 18 '22 02:12

ouah