c++ get length of array

C++
int arr[5];
int len = sizeof(arr) / sizeof(arr[0]);
// returns 5
Source

Also in C++: