[Solved] Error while implementing a complex construct in C < char (*(*f())[]) () >


Use typedefs to help:

#include <stdio.h>

typedef char (*functionPtr)(void);
typedef char (**arrayOfFunctionPtr)(void);

// OR THIS
// typedef functionPtr* arrayOfFunctionPtr;

typedef arrayOfFunctionPtr (*functionReturningArrayOfFunctionPointers)(void);

int main()
{

    functionReturningArrayOfFunctionPointers f;

    char s() 
    {
        return 'y';
    }

    char (*g[1])();
    g[0] = s;
    printf("%c\n",g[0]());


    arrayOfFunctionPtr func()
    {
        return g;
    }

    f = func;
    printf("%c\n",(f())[0]());

    return 0;
}

solved Error while implementing a complex construct in C < char (*(*f())[]) () >