char *foo(char *dest, const char *src)
{
unsigned i;
for (i=0; src[i] != '\0'; ++i)
dest[i] = src[i];
dest[i] = '\0';
return dest;
}
I know that the code is moving through both variable's arrays, and while it's doing that, it makes dest[] have the same character as src[]
How can i do this with pointers instead?