Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Challenge accepted, no cheating, no references, just editor and me. Hope that I got it right:

    int (*(*p)(int (*[])(void *)))(void *);
The process:

    ?which-returns (*p)( ?taking           )
                 ? (*p)( int (*[])(void *) )
             int (*(*p)( int (*[])(void *) ))(void *)
Testing with cdecl.org [1]:

    declare p as pointer to function [taking] (array of pointer to function (pointer to void)
     returning int) [, which] returning pointer to function (pointer to void) returning int
F-yeah. Can I has my pat? Seriously, it is not so hard if you used each component at least 100 times. That's few years of practice of non-hiding behind typedefs. You can't learn if you don't practice. (I'm not arguing that this should not be decomposed.)

[1] http://cdecl.ridiculousfish.com/?q=int+%28*%28*p%29%28int+%2...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: