We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Arrays and Strings
- Printing Tokens
- Discussions
Printing Tokens
Printing Tokens
Sort by
recency
|
742 Discussions
|
Please Login in order to post a comment
If you have no idea how to approach this, check out the example code here:
https://en.cppreference.com/w/c/string/byte/strtok
Here is Printing Tokens in C problem solution - https://programmingoneonone.com/hackerrank-printing-tokens-solution-in-c.html
include
include
include
include
int main() {
char *word = strtok(s, " "); while(word != NULL) { printf("%s\n", word); // Print each word in new line word = strtok(NULL, " "); // Move to next word } return 0; }
int main() {
}
It’s widely used for systems programming, embedded systems, and building performance-critical applications. Skysetx