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

谁能解释一下o/p??
o/p 是

52

4

2 回答 2

12

它相当于:

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

这相当于:

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

'4'的ASCII 值为52

于 2013-03-02T14:13:01.913 回答
0
#define power(a) #a   //# is a stringization operation in macro
  int main()
  {
    printf("%d",*power(432));
     return 0;
  }

Hence after calling power(432), macro will return it "432" and applying * on it gives first value which is nothing but 52 (48 + 4) for '4' . 
于 2013-03-02T17:38:09.997 回答