c find last element in array

C
sizeof(array)/sizeof(array[0]) - 1

Source

Also in C: