Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

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: %d
",rows);
printf("cols: %d",cols);
 
PREVIOUS NEXT
Tagged: #array #dimensions
ADD COMMENT
Topic
Name
1+5 =