- Can you post more of your code? Depending on if you are using functions or not we may be able to deallocate "id" at the end of the scope so that when the function is called again it get's redeclared.
- IMO the variable "id" would be better off as a char pointer (char*) instead of a char array, then you could just set "id" to the value returned by the "strtok()" function and then in order to clear it you set "id" back to NULL.