А
Size: a a a
А
TS
C
AM
TS
C
AM
C
AM
AM
C
AM
char* get_string() {
char *res = malloc(sizeof(char));
size_t len = 0, lim = 1;
while ((res = (len < lim ? res : realloc(res, lim *= 2))) ? (res[len++] = getchar()) != '\n' : NULL);
return res ? ((res = realloc(res, len + 1)) ? (res[len] = '\0', res) : NULL) : NULL;
}
AM
C
TS
k
C