To summarise mine and @cody-gray's answer.
The null
string terminator is only applicable if you're using it as a string.
If you're using it as an array of char
, then it's a value like any other.
To be able to use it, you will need to pass the size of the array as an additional parametre, and loop through the array using the size, rather than according to any terminator.
void foo(char* c, int size){
...
}