warning: function returns address of local variable [-Wreturn-local-addr]
snippet in c

warning: function returns address of local variable [-Wreturn-local-addr]

user9149

// Use memory allocation!!

char *str_to_ret = malloc (sizeof (char) * required_size);