Home > Back-end >  <> problem about the value of the pointer with the address of the pointer itself the same ques
<> problem about the value of the pointer with the address of the pointer itself the same ques

Time:10-02


1, for example, in a two-dimensional array [3] [3], including & amp; A [0] and & amp; A [0] [0] values are the same, that is to say, & amp; A [0] to get the address and a [0] itself stored address is the same, this is my first question: why, what is the role,
2, in the function pointer, we declare a function pointer p, define a method fun (), then p=& amp; P=fun and fun is the same, this also means that the function name and the before mentioned a [0] have similarities, namely, the address of the variable itself and its storage address is the same,
But, when we were in the calling function, the normal is directly fun () {} is ok, but why (* fun () {}) can also be called?

CodePudding user response:

1 a [0] and a [0] [0] is the first address is the same array & amp; Is the address of the variable take
2 also means that the function name is the address of the function
Two calls is just way different, practical

CodePudding user response:

Is the same, different compilers vary slightly
  • Related