The code calculates the length of a character array pointed to by 'p'. It finds the terminate symbol '\0' and then substructs the pointer to the initial symbol from the pointer to that terminate symbol and gets number of bytes between them.
It would be better to write