#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>

#define SIZE 200
#define WORDS 5
#define SENTENCES 20

int main(void)
{
    const char *article[WORDS] =
    { "the", "a", "one", "some", "any" };

    const char *noun[WORDS] =
    { "boy", "girl", "dog", "town", "car" };

    const char *verb[WORDS] =
    { "drove", "jumped", "ran", "walked", "skipped" };

    const char *preposition[WORDS] =
    { "to", "from", "over", "under", "on" };

    char sentence[SIZE];

    srand((unsigned int)time(NULL));

    for (int i = 0; i < SENTENCES; ++i)
    {
        sentence[0] = '\0';

        strcat(sentence, article[rand() % WORDS]);
        strcat(sentence, " ");

        strcat(sentence, noun[rand() % WORDS]);
        strcat(sentence, " ");

        strcat(sentence, verb[rand() % WORDS]);
        strcat(sentence, " ");

        strcat(sentence, preposition[rand() % WORDS]);
        strcat(sentence, " ");

        strcat(sentence, article[rand() % WORDS]);
        strcat(sentence, " ");

        strcat(sentence, noun[rand() % WORDS]);

        sentence[0] =
            (char)toupper((unsigned char)sentence[0]);

        strcat(sentence, ".");

        printf("%s\n", sentence);
    }

    return 0;
}