What incase of a string

example here is shown with a character array. What if I take a string object.

This shows error.

How do i proceed with string.?

and technically *ptr has the value and printing ptr should result in only printing the address.

@djsaurabh.axel hey both the character array and string are different, and this function is not overloaded to work with string object.
To perform tokenization for string object you will need to create custom function.
If this resolves your doubt mark it as resolved.

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.