//RANDOM SENTENCE GENERATOR USING STRCAT

//I added the strcat command the program crashes..
//This program is suppossed to genterate random sentences..
//My teacher says that we HAVE TO USE STRCAT to catonate the sentences..
//IN CLASS MY PROFESSOR COULDNT GET THE PROGRAM TO RUN EITHER



#include<iostream>
#include<ctime>
#include<cstdlib>
#include<string.h>// I also tried <cstring>


using std::cout;
using std::cin;
using std::endl;

int main()
{



char *art[ 5 ] = {"The", "This", "That", "Any", "A"};
char *adj[ 10 ] = {"skinny", "hairy", "scary", "ugly", "bald",
"big", "small", "tall", "long", "pretty",};
char *noun[ 8 ] = {"girl", "house", "car", "toy", "man", "woman",
"cat", "brother"};
char *verb[ 10 ] = {"went", "jump", "skip", "ran", "swam",
"moves", "walked", "talked", "hopped", "swirved"};
char *prep[ 7 ] = {"with", "at", "by", "in", "to", "from", "under"};

srand (time(0));

int a = rand() % 5;
int b = rand() % 10;
int c = rand() % 8;
int d = rand() % 10;
int e = rand() % 7;

char *s = " ";
char *s1 = art[ a ];
char *s2 = adj[ b ];
char *s3 = noun[ c ];
char *s4 = verb[ d ];
char *s5 = prep[ e ];
strcat(s1,s);//THIS IS WHAT MAKES THE PROGRAM CRASH
//cout <<s1<<s<<s2<<s<<s3<<s<<s4<<s<<s5<<s<<s1<<s<<s2<<s< <s3<<".\n";

return 0;
}