#include<iostream>
#include<cstring>
using namespace std;
int main()
{
char sentence[]="This is a sentence with 7 tokens";
cout<<"The string to be tokenized is:/n"<<sentence<<"/n/nThe tokens are:/n/n";
char *tokenPtr=strtok(sentence,"e");
while(tokenPtr!=NULL)
{
cout<<tokenPtr<<'/n';
tokenPtr=strtok(NULL,"e");
}
cout<<"After strtok, sentence = "<<sentence<<endl;
return 0;
}