CodePudding user response:
Here you can fill in the p - s; And the back of the annotation also illustrates this,In addition, it is important to note myStrlen function s, while writing is an array, is actually a pointer, since the compiler has been in accordance with the pointer,
From another knowledge also can prove that this is not an array, but a pointer, according to the parameter value is passed, the argument is assigned to the parameter (can be understand so), if the parameter is an array name, according to the array name can't be an lvalue, so contradiction,
So, parameter name written in the array, directly can be understood as a pointer,
CodePudding user response:
No code is not the truthCodePudding user response:
After a while loop, p has reached the last element of an array of addressWhile s said that the first element in the array address
So here can be directly use p - s