#include <stdio.h>
#include <string.h>
int main( void )
{
char mins[21] = "";
char maxs[21] = "";
for( char word[21]; printf("Enter Word: "), scanf("%s",word)==1 && strlen(word)!=4; )
{
if( mins[0]=='\0' || strcmp(mins,word)>0 )
strcpy( mins, word );
if( strcmp(maxs,word) < 0 )
strcpy( maxs, word );
}
printf( "Smallest Word: %s\n", mins );
printf( "Largest Word: %s\n", maxs );
}