Prova con strtok:


codice:
char * compute( char *text )
{
	char *ptr = strtok( text, " \n\t,.;:!\"?" );
	char *str = ptr;

	while( ptr != NULL )
	{
		str = strlen(ptr) > strlen(str) ? ptr : str;
		ptr = strtok( NULL, " \n\t,.;:!\"?" );
	}

	return str;
}