I got confused with some examples,
wich one is correct?
char s = malloc(81);
or
char s = malloc(81*sizeof(char));
?
-----
when i do:
str = realloc(str, XX * sizeof(char));
does the realloc free the old str memory?
-----
its
str = realloc(str, XX * sizeof(char));
or
str = realloc(str, XX);
?
Thanks!