In the function, a is a one-dimensional array, which is the const pointer. At this time, sizeof(a) can calculate 4* 10.
=
40, sizeof(int) is 4.
Second, in int
Finally, pass the as an address to the function. This arr is just a pointer variable with a size of 4 bytes. When using sizeof(arr), you can only get 4.
This sizeof is very strange. You defined it in the main function.
tea
*b
=
“hello world”;
If you use sizeof(b), you can also calculate 4, I see, hehe.