int * getRandom( )
{
static int r[10];
// set the seed
srand( (unsigned)time( NULL ) );
for (int i = 0; i < 10; ++i)
{
r[i] = rand();
cout << r[i] << endl;
}
return r;
}
I want to know in this there is a function which is named as getRandon and the data type of this function is int. why we have declared this functions as a pointer.