c - What is the meaning of `int a[6][(2,2)]` array? -


the second dimension of array not clear. size of array 48, int 2 bytes exact difference between int a[6][4] , int a[6][(2,2)]?

what exact difference in int a[6][4] , int a[6][(2,2)]?

there big difference. int a[6][(2,2)] largely equivalent int a[6][2]. (2,2) expression involves comma operator , evaluates 2.

the subtle difference (see comment @virgile) (2,2) not constant expression in c. int a[6][(2,2)] size 6 array of size 2 variable length arrays. technically, equivalent to

int n = 2; int a[6][n]; 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -