J
Jarmo
Nicolas said:On most implementations of the standard C library, the functions that
copy characters in a previously allocated buffer, like strcpy or strcat,
are returning the pointer to that buffer.
On my NetBSD system, man strcpy gives the following prototype :
char *strcpy(char * restrict dst, const char * restrict src);
What's the point in returning a pointer we already know before the call?
Thank you in advance for an explanation.
So that you can write (unnecessarily abbreviated) code like this:
strcat(path, strcpy(file, "fred.txt"));