//Trying to find largest word in string.
#include
#include
#include
using namespace std;
int main()
{
int n,m;
char s[100]=“my name is tushar”;
char a[100];
char*ptr=strtok(s," “);
cout<<ptr<<endl;
m=strlen(ptr);
while(ptr!=NULL)
{
ptr=strtok(NULL,” ");
n=strlen(ptr);
if(n>m)
{
strcpy(a,ptr);
}
}
cout<<a<<m;
return 0;
}