C Quiz Part II -- Pointers into Arrays
Q. What is the output of this program?
int f(int b[][2]){ return ++b[0][0]; } int g(int b[][2]){ return ++b,b[0][0]; } int h(int b[][2]){ return (++b,b[0][0]); } int i(int b[][2]){ return (1+b,b)[0][0]; } main(){ int a[][2]={101,201,301,401}; printf("f=%d\n",f(a)); printf("g=%d\n",g(a)); printf("h=%d\n",h(a)); printf("i=%d\n",i(a)); }Further reading.