i am not able to understand why have we created mystrtok a poniter function and what does this line input=input+i+1 do?
Designing string Tokeniser
@jatinupadhyay786 hey pointer function is created as it return pointer which pointed toward the tokenised string ,also input points to char array first element so input+i+1 move the pointer to i+1 forward and now that pointer point to input+i+1 position.
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.
what i mean is input =i+1 karna chaiye tha why do we have done input+i+
@jatinupadhyay786 input+i point to token and we have to start from one index ahead thats why we are doing input+i+1,do dry run on 1 case you will get it.
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.