I have to assign memory to a 3D array using a triple pointer.

```
#include <stdio.h>
int main()
{
    int m=10,n=20,p=30;
    char ***z;
    z = (char***) malloc(sizeof(char**)*m*n*p);
    return 0;
}

```

Is this correct way of doing this?(I think what i am doing is incorrect.)