A
Andrej Prsa
Hi,
sorry for the newbie question; after reading the FAQ, I am still left
wondering if this is legal:
void strip (char *in)
{
in[strlen(in)-1] = '\0';
return;
}
I figure it is, because the memory location of the variable 'in' is
passed properly and I guess that the strlen() function seeks the '\0'
character to obtain its value. Is this true?
Thanks,
Andrej
sorry for the newbie question; after reading the FAQ, I am still left
wondering if this is legal:
void strip (char *in)
{
in[strlen(in)-1] = '\0';
return;
}
I figure it is, because the memory location of the variable 'in' is
passed properly and I guess that the strlen() function seeks the '\0'
character to obtain its value. Is this true?
Thanks,
Andrej