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.
Loading...
Related Quiz
- The ______ function in C can be used to change the position of the file pointer in a stream.
- How do you declare a two-dimensional array of integers with 3 rows and 4 columns?
- In C, using pointers to structures can lead to more efficient memory usage because it allows for ________ allocation and deallocation of memory.
- Enumerations provide a way to assign ________ to a set of named constants.
- The fread function in C is used to read data from a file and stores the data in the ________.