#include <string.h>
#include <stdio.h> 

int main () 
{
    char str[80] = "Hello-say-merhaba"; 
    char *token;        
    
    token = strtok(str, "-");
    while( token != NULL ) 
    {       
        printf( " %s\n", token );
        token = strtok(NULL, "-");    
    }        

    return(0); 
}

16 Comments

Leave a Reply

Avatar placeholder