C getline() function: return value vs second argument
Do the return value (type ssize_t) of the C getline function and the second argument *n (type size_t) contain the same information, after invocation? Empirically, it seems that *n equals (size_t)pow(2, ceil(log2(<return value> + 1))). Is this relation true in general? Can someone explain its (in)validity, conceptually? >Solution : ssize_t getline(char **lineptr, size_t *n, FILE… Read More C getline() function: return value vs second argument