Why is the program below crashing? I tried debugging the code but couldn't understand; I am suspecting that either the program is wrong or the memory to the passed pointer to `display` function should have been initialized.

```
#include <iostream>
using namespace std;

int display( int** intarray )
{
    int size = 0;
    while( size < 10 )
    {
        *intarray[size] = size;
        size++;
    }

    return size;
}

int main() {
    int* intptrarray;
    int arraysize = 0;
    arraysize = display( &intptrarray );

    for ( int indx = 0; indx < arraysize; indx++ )
    {
        std::cout << intptrarray[indx] << std::endl;
    }
    return 0;
}

```