#include <iostream>
#include<time.h>
#include<stdlib.h>
using namespace std;
int main()
{
string arr[] = {"hey","music","ola","dang"};
int size = sizeof(arr) / sizeof(arr[0]);
int random;
srand(time(0));
for (int i = 0; i < size; i++)//note the indexing starts from 0
{
random = rand() % ((size)); //changed this
cout << random << "\t" << arr[random] << endl;
}
cout << endl;
}