string - How much space should i allocate with malloc? -
i writing program reads in strings no more 20 characters have use malloc dynamic memory allocation. problem not know how space have free 20 character strings. appreciated.
char * string = malloc(sizeof(char) * 21)
Comments
Post a Comment