Q:

how to print random cout statement? 

Basically, I have five different cout outputs, I would like to print one of them on random out of five. 
#include <iostream>
#include <string>
#include <cstdlib> using namespace std;

int main(){

        string name[2] = {"Nao","Shilla"};
        string behaviour[4] = {"recognise","detect","avoid","replace"};
        string position[4] = {"above","below","left","right"};
        string pronoun[3] = {"I","you","they"};
        string object[4] = {"car","person","dog","diamond"};
        string texture[3] ={"smooth","dimpled","rough"};

        srand(time(NULL));

        cout <<name[rand() % 2] << " " <<behaviour[rand() % 4]<< " " <<object[rand() % 4] <<endl;
        cout <<name[rand() % 2] << " " <<behaviour[rand() % 4]<< " "<<texture[rand() % 3] << " " <<object[rand() % 4] <<endl;
        cout <<name[rand() % 2] << " " <<behaviour[rand() % 4]<< " " <<position[rand() % 4] <<endl;
        cout <<pronoun[rand() % 3] << " " <<behaviour[rand() % 4]<< " " <<object[rand() % 4] <<endl;
        cout <<pronoun[rand() % 3] << " " <<behaviour[rand() % 4]<< " " <<position[rand() % 4] <<endl;

}

A:

You need to basically do the same thing that you did for the arrays, just generate a number between 0-4 and then use a switch statement to select which one you want to execute. 
#include <iostream>
#include <string>
#include <cstdlib> 
using namespace std;

int main(){

        string name[2] = {"Nao","Shilla"};
        string behaviour[4] = {"recognise","detect","avoid","replace"};
        string position[4] = {"above","below","left","right"};
        string pronoun[3] = {"I","you","they"};
        string object[4] = {"car","person","dog","diamond"};
        string texture[3] ={"smooth","dimpled","rough"};

        srand(time(NULL));

        switch(rand() % 5)
        {
            case 0:
                cout <<name[rand() % 2] << " " <<behaviour[rand() % 4]<< " " <<object[rand() % 4] <<endl;
            break;
            case 1:
                cout <<name[rand() % 2] << " " <<behaviour[rand() % 4]<< " "<<texture[rand() % 3] << " " <<object[rand() % 4] <<endl;
            break;
            case 2:
                cout <<name[rand() % 2] << " " <<behaviour[rand() % 4]<< " " <<position[rand() % 4] <<endl;
            break;
            case 3:
                cout <<pronoun[rand() % 3] << " " <<behaviour[rand() % 4]<< " " <<object[rand() % 4] <<endl;
            break;
            case 4:
                cout <<pronoun[rand() % 3] << " " <<behaviour[rand() % 4]<< " " <<position[rand() % 4] <<endl;
        }

}

