How does the strtok() function work in C?

  • It calculates the length of a string
  • It converts a string to uppercase
  • It performs a binary search
  • It splits a string into multiple substrings based on a delimiter
The strtok() function in C is used to split a string into multiple substrings based on a specified delimiter. It maintains state between calls, making it useful for tokenizing strings.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *