Created
July 4, 2018 10:11
-
-
Save thongntit/c5518d55ed9a3ea681d7570f92391162 to your computer and use it in GitHub Desktop.
String Split Applet split string with character
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//gcc 5.4.0 | |
#include <stdio.h> | |
#include <string.h> | |
int main(void) | |
{ | |
char str[50]="Hello, world!\n"; | |
char *ptr; | |
ptr = strtok(str,","); | |
printf("%s",ptr); | |
return 0; | |
} | |
/* OUTPUT | |
Hello | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment