Name: Anonymous 2009-06-25 0:32
suppose char *str has some bytes(not malloced), how can i determine the size of *str without access to str itself?
int strlen(unsigned char *string_start)
{
/* Initialize a unsigned char pointer here */
/* A loop that starts at string_start and
* is increment by one until it's value is zero,
*e.g. while(*s!=0) or just simply while(*s) */
/* Return the difference of the incremented pointer and the original pointer */
}