This commit is contained in:
louiscklaw
2025-01-31 21:27:38 +08:00
parent 8cce226ca9
commit ca0eb416dd
90 changed files with 4082 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
#include <string.h>
#include <stdio.h>
int main()
{
char str[80] = "This is - www.tutorialspoint.com - website";
const char s_delimit[2] = "-";
char *token;
/* get the first token */
token = strtok(str, s_delimit);
/* walk through other tokens */
while (token != NULL)
{
printf("%s\n", token);
token = strtok(NULL, s_delimit);
}
return (0);
}