Or rather, how does strtok produce the string to which it\'s return value points? Does it allocate memory dynamically? I am asking because I am not sure if I need to free th
Since the return pointer just points to one of the bytes in your input string where the token starts, whether you need to free depends on whether you allocated the input string or not.