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

android - Pass an Serializable object in AIDL -

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

How to use Authorization & Authentication in Asp.net, C#? -