So my teacher has a quiz question and his practice question for it is for us to code the strcpy function for character arrays assuming acceptable ones are passed. I have written my version and just want to see if it you see any errors in it. Or even if there's extra stuff happening that I don't know and should learn about. This is my first semester of C++ for reference.
char strcpy( char dest[], char src[] )
{
index = 0;
while( src[index] != NULL_CHAR )
{
dest[index] = src[index];
index++;
}
dest[index] = NULL_CHAR;
return dest;
}