Is there any way to know how many bytes I allocated? Example:
Is there any way to get the "100" somehow?Code:char *mystring = (char *) malloc ( 100 * sizeof(char)); mystring = "1234512345";
sizeof(mystring) returns 4
strlen(mystring) returns the total number of bytes up to a null termination (10)
How do I get "100"?