Coding/C
함수 포인터 인자와 리턴
빠리빵
2018. 6. 9. 14:14
#include?? f2(void) ?? static int a[3][4] = { 1,2,3,4,5,6,7,8,9,10,11,12 }; return a; } ?? f1(void) ?? return f2; } void main() { printf("%d\n", f1()()[1][2]); system("pause"); } /* int (*f2(void))(int) { static int a[3][4] = { 1,2,3,4,5,6,7,8,9,10,11,12 }; return a; } // f2 또한 함수이기 때문에 * 하나 추가하는 것을 실수하지 말 것 int (*(*f1(void))(void))[4]{ return f2; } */