/*
 * Author: ProgramCpp
 */
#include <stdio.h>
#include <string.h>

int main(void) {
	// your code goes here

   const char str[80] = "This is an example from - www.tutorialspoint.com - website";
   const char str2[80] = "This _ demo string _ should also be tokenized.";

   const char s[2] = "-";
   const char s2[2] = "_";
   char *token, *token2;
   
   /* get the first token */
   token = strtok(str, s);
   token2 = strtok(str2, s2);
   
   /* walk through other tokens */
   while( token != NULL || token2 != NULL) 
   {    
    if(token != NULL)
	{
		printf( " %s\n", token );
		  token = strtok(NULL, s);
	}

	 if(token2 != NULL)
	{
		  printf( " %s\n", token2 );
		  token2 = strtok(NULL, s2);
	}
   }
	return 0;
}