The program need to simply fill from keyboard a dynamically allocated matrix.
I have to add that i included . I'm working on a C++ compiler thus i have to add the cast to malloc. It seems to have this error: "Unhandled exception at 0x0F92FB53 (msvcr120d.dll) in ConsoleApplication42.exe: 0xC0000005: Access violation reading location 0xCDCDCDCD." while reaching at gets(a[i]) command.
After debugging it seems to also have a very apropriate proble at free sequence.

```
int main()
{
    int n, i;
    char **a;
    printf("introduceti numarul de cuvinte:\n");
    scanf("%d", &n);
    a = (char**)malloc(n*sizeof(char*));
    if (!a)
        printf("alocare nereusita");

    for (i = 0; i < n; i++);
    {
        a[i] = (char*)malloc(56 * sizeof(char));
    }
    for (i = 0; i < n; i++)
    {
        printf("introduceti urmatorul cuvant:\n");
        gets(a[i]);
    }
    for (i = 0; i < n; i++)
        free(a[i]);
    free(a);
    return 0;

}

```