#include <string.h> char * strdup (const char *source);
Returns a newly allocated area of memory that contains a duplicate of the string pointed to by source. The memory returned by this call must be freed by the caller.
Returns the newly allocated string, or NULL if there is no more memory.
not ANSI, not POSIX
char *foo() { return strdup("hello"); }
Go to the first, previous, next, last section, table of contents.