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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -