length of 2d array c++

C++
int rows = sizeof(arr) / sizeof(arr[0]); // returns rows
int col = sizeof(arr[0]) / sizeof(int); // returns col
Source

Also in C++: