String tokenizer

why we use pointer here and
can we use other variable here

@Ankit_123 No we have to use pointer here. It is defined within the strtok function.
On a first call, the function expects a C string as argument for str, whose first character is used as the starting location to scan for tokens. In subsequent calls, the function expects a null pointer and uses the position right after the end of the last token as the new starting location for scanning.

Refer this:
http://www.cplusplus.com/reference/cstring/strtok/

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.