/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <locale.h>
int main()
{
setlocale(LC_ALL, "Rus");
char str[] = "съешь ещё этих мягких французских булок, да выпей чаю";
char lw[100];
char *pw = strtok(str, " ,.");
int maxl = 0;
int slen;
while (pw != NULL) {
slen = strlen(pw);
if (slen > maxl) {
maxl = slen;
strcpy(lw, pw);
}
pw = strtok(NULL, " ,.");
}
printf("%s", lw);
return 0;
}