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

char * maxworld(const char * s,char* slmax)
{char slovo[10];
unsigned int i,j,dls,maxl;
dls=0;slmax[0]='\0';maxl=0;j=0;
for(i=0;i<=strlen(s);i++)
{if ((s[i]==' ')||(s[i]=='\0'))
 {slovo[j]='\0';
  if (dls>maxl){ maxl=dls;
   strcpy(slmax,slovo);}
  slovo[0]='\0';
    j=0;
    dls=0;}
  else {dls++;
   slovo[j++]=s[i];}
} return slmax;}
int main(int, char**)
{char st[80],maxsl[10];
puts("input string : world and space");
gets(st);
printf("V stroke slovo ");
printf("""%s"" - macsimalno \n",maxworld(st,maxsl));
puts("input string : world and space");
gets(st);
maxworld(st,maxsl);
printf("V stroke slovo ");
printf("""%s"" - macsimalno \n", maxsl);
    return 0;
}
