Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - An error in the program segment of C language
An error in the program segment of C language
First of all, I'm not an expert. I'm just analyzing this program with you.

1, this error report means: there is no variable before the assignment symbol =, just like writing int = 8; For the same reason.

Just write a variable in front, such as: func1pfun =&inc; Do it. In fact, this statement was not used in later programs.

2、typedef int(* func 1)(int in); This sentence defines a pointer to a function and the return value is int. FUNC 1(int in) is the prototype of the function.

3. The principle is the same as 2.

4.funC2 fun means that the FUN variable is an integer that points to the FUNC2 function. Just like defining the form of parameter max(int a, int b).

Finally, printf("%d ",arg2) is output by the way; Arg2 is actually an address, which is the address of int a and A defined in main (). The address of A is 0x00 12ff7c, so the final output is in decimal form, 1245052.

I hope your question has been answered.