fork download
  1. #include <stdio.h>
  2.  
  3. #define PRINT(x) printf("%-24s: %zu\n", #x, sizeof(x))
  4.  
  5. int main(void)
  6. {
  7. // 포인터의 배열을 가리키는 포인터를 반환하는 함수 포인터의 배열을 가리키는 포인터
  8. // declare foo as pointer to array 17 of pointer to function (void) returning pointer to array 23 of pointer to char
  9. char *(*(*(*foo)[17])(void))[23];
  10.  
  11. PRINT( foo );
  12. PRINT( *foo );
  13. PRINT( (*foo)[0] );
  14. PRINT( (*foo)[0]() );
  15. PRINT( *((*foo)[0]()) );
  16. PRINT( (*((*foo)[0]()))[0] );
  17. PRINT( *((*((*foo)[0]()))[0]) );
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5416KB
stdin
Standard input is empty
stdout
foo                     : 8
*foo                    : 136
(*foo)[0]               : 8
(*foo)[0]()             : 8
*((*foo)[0]())          : 184
(*((*foo)[0]()))[0]     : 8
*((*((*foo)[0]()))[0])  : 1