When you use sizeof(
array) / sizeof(
array[0]) you will
get the number of elements in the
array. int arr[] = {1, 2, 3, 4, 5}; Is an
array of 5 elements, each element (int) takes 2 bytes so the
array size is 10 bytes. long arr[] = {1, 2, 3, 4, 5};
Feb 8, 2018');})();(function(){window.jsl.dh('_mcWOYLe9CtCe0PEP1o-M2Ao43','
');})();(function(){window.jsl.dh('9','
One way\u200b to find the length of an array is to divide the size of the array by the size of each element (in bytes).