in this mystrtok is inbuilt or user define function ? if it is user defined than then on substequent calls str has value null and it should return null.
Related to tokenisation
obviously it is user define
you are defining the fucntion mystrtok()
this is because we are storing the input in static variable on first time of call
and static variable destroyed after the program execution complete
so it will store it till the end of program