+ 2

How to split string by spaces into words with C?

Hi. It is really easy to split strings with python by using it's built in function. But I cannot do it with C. I want to split a string by space and make the words separate. Please help me to do this.

4th Jul 2020, 2:19 AM
Mahdee Mohammad
Mahdee Mohammad - avatar
2 Réponses
+ 4
Consider using either sscanf() or strtok() to break up a string by space delimiters.
4th Jul 2020, 2:39 AM
Brian
Brian - avatar