Use of strtok in C: How do I use them correctly? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Use of strtok in C: How do I use them correctly?

Hi guys. While solving some code coaches, I found out that strtok function from string.h library is pretty useful. However, I'm not sure how to use that. Is the thing like strtok divides the given string into two parts? And that is the reason why we use them in loops? Even so, how does it divide NULL there?😶 noise = strtok(NULL, " "); [plz check the code.!] https://code.sololearn.com/cckfSzsNfKui/?ref=app

13th May 2021, 4:11 PM
Md Shahriar Rahman
Md Shahriar Rahman - avatar
0 Answers