Answers for "c 2d array dimensions"

C
0

c 2d array dimensions

int array[2][5];
int rows;
int cols;
cols = sizeof(array[0]) / sizeof(int);
rows = (sizeof(array) / sizeof(int))/cols;
printf("rows: %dn",rows);
printf("cols: %d",cols);
Posted by: Guest on February-06-2022

Code answers related to "C"

Browse Popular Code Answers by Language