(*(void(*)())0)();

(*(void(*)())0)();

analysis:

1. (void (*) ()) 0: 0 is converted to point void (*) () function pointer type;

2. * (void (*) ()) 0, corresponding to * p, the content of this function pointer set to 0, which is a function of the content of the first address, * (void (*) ()) 0 is equivalent to the already function.

  It is equivalent to:

  int a;

  int *ptr;

  ptr = &a;

  Then * ptr is not equivalent to a can, and to operate a * ptr operation and the same.

3. The second step of this function is called to get there (* (void (*) ()) 0) (); equivalent (* p) ().

Guess you like

Origin www.cnblogs.com/aiden-zhang/p/11407552.html