E
Emmanuel Delahaye
Vimal Aravindashan a écrit :
Off by one. Marc's solution was far better.
bang!
Although the above does what you expect it to, I'd prefer
char *res = malloc( strlen("abcdef") * sizeof(char) );
OR
char *res = malloc( strlen("abcdef") * sizeof(*res) );
Off by one. Marc's solution was far better.
bang!