As Salem's post suggests, the argument s, in the definition of rev1, is a pointer. As such, the compiler evaluates sizeof(s) to be the size of a pointer, 32 bits or 4 octets. If you really need to know the length of the array of char's that s points to, you could use e.g.
int length = (int)...