I have char[] as such
char string[] = "Hello world !!!";
when I'm trying to reallocate it's memory I'm getting error
realloc(string, 50); // error here
You can only realloc
things you malloc
/calloc
/realloc
'ed. A char
array is not any of those things, so it is normal for you to get an error in this case.