This one trick to do sqr() and cube() in C: https://godbolt.org/z/7qeanM
Compiler Explorer - C
int sqr(int n) { char p[n][n]; return sizeof p; } int cube(int n) { char p[n][n][n]; return sizeof p; } int main() { printf( "%d %d\n",sqr(2), cube(2)); printf( "%d %d\n",sqr(3), cube(3)); printf( "%d %d\n",sqr(4), cube(…godbolt.org