Returning string from function having multiple NULL '\0' in C
问题 I am compressing string. And the compressed string sometimes having NULL character inside before the end NULL. I want to return the string till the end null.But the compressor function is returning the sting till the occurring of the first NULL. Please help me. char* compressor(char* str) { char *compressed_string; //After some calculation compressed_string="bk`NULL`dk";// at the last here is automatic an NULL we all know return compressed_string; } void main() { char* str; str=compressor(