Different approch

can we do this question using string tokenization? if yes then please explain it…

@Ayushmahajan513
hello Ayush,
There is no perfect delimiter here.
You cannot use the strtok() function to split a string which is in camel case perfectly.

Consider this
string s = “Coding-Blocks-Code-Your-Way-To-Success”

Now if we want to split this string into words by “-” then we should use the commands
strtok( s, “-” )

And you may observe that in the final result obtained, the delimiter “-” used is not occurring. So we can infere that if we try to split a camel case string using strtok, the delimiter i.e. the capital letter will be missing.

1 Like

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.