I would like to know if there is a special reason that we are using a dynamic array and not a normal stack array while implementing the string tokenizer function?
What is the reason why we are using a dynamic array and not a normal array?
Hi @jamesallenvinoy, can you pls tell where are you implementing/using the function.
Also we use dynamic array because we don’t know how many tokens/substrings will the given string break into.
If your this dosent answer your question pls save your code on ide.codingblocks.com or share the ode or question here.
This question is prateek bhaiya’s implementation in “Advanced DSA in C++” for strtok function.
I have shared the code in the ide.
@jamesallenvinoy,pls share the URL on this thread after you have saved ur code on ode.codingblocks.com.
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.