Tokenizer function

So, can we not pass a string as an argument in the strtok function?
In the video, sir passed a character array as an argument to the strtok function, but when I tried to pass a string as an argument in my program, there was error. Please explain.

hello @priyam04

strtok function takes char * as its first argument, so if u pass string object as itsfirst argument then it will show u compilation error.

convert string object into char * and then pass it to 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.