about C Language function name , Get address function name , Dereference function name relationship
void IsWeekDay() { printf("P(IsWeekDay) = %p\n",IsWeekDay); printf(
"P(*IsWeekDay) = %p\n",*IsWeekDay); printf("P(&IsWeekDay) = %p\n",&IsWeekDay); P
(IsWeekDay) = 0x80484db P(*IsWeekDay) = 0x80484db P(&IsWeekDay) = 0x80484db }
You can see that the three are equal , The analysis is as follows :
IsWeekDay: Is the first address of the function , Its type is void ();
&IsWeekDay: Represents a pointing function IsWeekDay Address of this object ;& The definition explains everything
Its type is void (*)(), therefore IsWeekDay and &IsWeekDay The address value represented is the same ,
But the types are different .IsWeekDay Is a function ,&IsWeekDay The value of the expression is a pointer !
*IsWeekDay:*IsWeekDay Get function address , Because there are relevant regulations , expression * function The value of is the corresponding function indicator .
So when the transfer function is generally the transfer function name IsWeekDay;

int a[5][5];int **a;
You can deduce the relationship
int a[5][5]; P(a) = P(&a) = P(*a)

Technology