When i call mystrtok function after first call i.e. with str as NULL, a segmentation fault is returned
Mystrtok function call second time
If you don’t know how to share code, you can also ask me that.
My code-
Your *ptr is a pointer which will point to that character variable for which you have designed your strtok function.
See this
I have implemented for the approach you were using so that you can correct your mistakes
1 Like
Ok i found it, Thanks
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.