/* strtok example */
#include <stdio.h>
#include <string.h>
int main ()
{
char str[] ="- This, a sample string.";
char * pch;
printf ("Splitting string "%s" into tokens:
",str);
pch = strtok (str," ,.-");
while (pch != NULL)
{
printf ("%s
",pch);
pch = strtok (NULL, " ,.-");
}
return 0;
}
Code Example |
---|
C :: string input c |
C :: take long long input in c |
C :: how to sort assending in c |
C :: uuidv4 javascript |
C :: Array Input/Output in C |
C :: matrix multiplication in c |
C :: c strcat |
C :: accessing elements of 1d array using pointers |
C :: gcc option to show rules of makefile |
C :: pyramid using c |
C :: c sleep milliseconds |
C :: what is the usage of extern in c |
C :: enum in c |
C :: inputting an array in c |
C :: round float in c |
C :: how to compareTo in java |
C :: c check if character is a space |
C :: binary search tree of strings in c |
C :: actionbar content color in android |
C :: maximo comun divisor |
C :: Initialization of a 3d array in c |
C :: getchar c |
C :: check if string contains a character in c |
C :: c file struct |
C :: check command line input is a number in c |
C :: linear and binary search |
C :: C Syntax of return statement |
C :: ouverture du fichier c |
C :: fork |
C :: hgggggggggggggggg |