Please explain me

After the first step when we passed string s in mystrtok(s,’’)…

After that we when we make subsequent mystrtok calls by passing NULL in it ,

please explain me the part after that

@shresth_2000, strtok takes, two parameter viz.

  1. str (char*):C string ,which is being broken into smaller strings (tokens).
    Alternativelly, a null pointer may be specified, in which case the function continues scanning where a previous successful call to the function ended.

  2. delimiters(char):C string containing the delimiter characters.

so by specifying null pointer , you are telling the strtok to work on the previous string that it was operating on and fetch the next word, if you pass s again it will keep on fetching the first word,
I hope that was what u wanted to know
In case of any doubt feel free to ask :slight_smile:
Mark your doubt as RESOVLED if you got the answer