>does it have to be replaced with '\0' or is it just a '0'?
'\0' is an escape character with the value of 0 that's used as a string terminator. '0' is not the same thing.
>and would I have to replace all of the whitespace or just the last one
Just the last one. If the string has {'t','e','s','t',' ',' ',' ','\0'} then you only need to replace the first space character after 't' with '\0'. That truncates the string appropriately.
>Also would it be easier for me beginner to programming not to use memmove
The manual solution isn't any simpler:
for ( i = 0; a[i] != '\0'; i++ ) {
if ( !isspace ( a[i] ) )
break;
}
if ( i > 0 ) {
for ( j = 0; a[i] != '\0'; i++, j++ )
a[j] = a[i];
a[j] = '\0';
}
Compare that to memmove:
for ( i = 0; a[i] != '\0'; i++ ) {
if ( !isspace ( a[i] ) )
break;
}
if ( i > 0 )
memmove ( a, a + i, strlen ( a + i ) + 1 );