After turning over C language traps and defects, the following is a brief summary:
Let's take a look at a statement:
(* (Void (*) () 0 )();
We can only use metamorphosis to describe it. Next we will analyze it step by step:
The simplest way to declare variables:
Int a; // declare a variable of the int type
Simplest function declaration method
Int fn (); // declares that the result type returned by the fn function is int.
The simplest method of pointer declaration:
Int * p = 0; // declare a pointer to the int type p, initialized to 0.
The function that returns the pointer:
Int * ();
The simplest method to declare function pointers:
Int (* h )();
H is a function pointer. What should I do if I want to forcibly convert the type?
In fact, it is very easy.
Simple type conversion:
Void * p = 10;
Printf ("% dn", (int *) p );
The function pointer is the same,
For example, what if we want to forcibly convert a function to an int (* h) () type function pointer?
You only need to (int (*) (expression...
What if I want to declare a (int (*) () type pointer function?
Step 1 declare a function pointer
Int (* )();
You only need to use (int (*) () as a type to forcibly convert.
(* (Int (*) () )()
It is actually a function pointer of the type (int ..