please explain strcpy command !!!!!!!!
is the following a valid function ??
I am guessing this function is just copying string from BEGIN to END using the strcpy command but not sure ofCode:
char *strcpy (char *End, char *Begin)
{ char *s, *t;
s = Begin;
t = End;
while (s = '\0')
{ t = s;
*s++;
*t++;
}
t = '\0';
return t;
}
1) if the while loop is correct
2) what the deal is with saying t = '\0' wouldn't the loop end automatically when *t pointed to the NULL character??
3) do you return t or 0 ???