I am not a C programmer, so I am not that familiar with C-string but now I have to use a C library so here is a shortened version of my code to demonstrate my problem:
It's better to allocate memory in heap for this case by using:
int* someDataForParams(void *_params) { ... int* charCounts = calloc(96, sizeof(char*)); ... return charCounts; }
96 is just a string length(Just a magic number)