How to get the Length of an Array in C
There isn’t really a standard way to get the length of array in C. This means you need to do some additional work to achieve getting the length of an array when using C. Creating and Looping through an Array in C Usually you would create an array as follows: int items[5] = {1, 2, 3, 4, 5}; You could always define the size right off the bat: const int SIZE = 5; int items[SIZE] = {1, 2, 3, 4, 5}; This way if you need to loop through the array later on, you can use your SIZE variable....